Problem updated to a position of the element using javascript style.top estate version 4.6

I develop a scrolling of content when the user clicks on an item, the program triggers the event and moves the content, it works perfectly in a device with the 5.0 version of the software, but in devices with software version 4.6 doesn't work

No trigger that any error just doesn't work

Here's him sew:

var pag1 is document.getElementById ('page1');.

function that removes "px" for the calculation

function quitapx (str) {}
return str.replace('px',"")
}

function that moves the item (pag1) upwards or downwards

mueve function (o) {}
var dir = o.dir;
posT = Number (quitapx (pag1.style.top))
If (dir =-1) {}
If (posT<>
                PAG1.style.top = posT + 64 + 'px ';
}
}
If (dir = 1) {}
If (posT > program) {}
               PAG1.style.top = posT - 64 + 'px '.
}
}
} //mueve1

clues?

I already found the problem.

The first time that the user clicks to move the content, the pag1.style.top property is set to null, in the browser with version 5.0 software ignores and starts running, but in the browser with version 4.6 software detect zero and stop the script.

the solution I use is

If (pag1.style.top! == null) {}
posT = Number (quitapx (pag1.style.top));
} else {}
posT = 0;
}

And work! Here is a picture.

Tags: BlackBerry Developers

Similar Questions

  • Development of the element using Javascript

    Hello experts!

    I have a problem with the setting of a value of element using javascript.

    I have a button on my page which should regulate my point P1_SORT to the value 'test '.

    I call the function with the following statement in the section my button URL:
    javascript:f_setItem('P1_SORT');
    The problem is that the item is not defined when you call the function.
    Maybe you can help me understand why the service is defective and how it should be like.

    The code I have (in my head of page) is as follows:
    <script language="JavaScript" type="text/javascript">
    function f_setItem (P1_SORT)
    { 
    get.add(P1_SORT,('test').value)
    gReturn = get.get();
    get = null; 
    ;
    }
    </script>
    Thanks for your help!

    Sebastian

    'test' is a string? or the element name?

    Try this:

     function f_setItem (P1_SQRT)
    {
    var pValue='test';
    $x(P1_SQRT).value = pValue;
    }
    

    or

     function f_setItem (P1_SQRT)
    {
    var pValue='test';
    $x('P1_SQRT').value = pValue;
    }
    

    but of course it is jquery

    Edit: second work because the element name is P1_SQRT -, as a variable in the function definition. If U accept jquery U should combinate with this example and I think it should work fine

    Edit2: Var initialized U get?

  • Position of the element Animate incorrect edge in Chrome

    I've created an animation on board animate that worked well in the beginning and now is not rendered properly in Chrome. The animation works well, the problem is in the position of the element. Is - it maybe a bug on board animate? For any idea or suggestion would be greatly appreciated.

    Rendering of Firefox, opera and IE 11.

    decibel-correct.JPG

    Rendering of chrome.

    decibel-incorrect.JPG

    You have applied the new update that came out today - get your update to animate the edge, addressing problems of compatibility with Chrome 36 ' Adobe Edge leading Team Blog »

    Darrell

  • Difficulty of positioning of the images using widgets

    First, I will start by saying that I really, really, really want to love this program and work with it regularly. I've been an evangelist for her and love the whole proposition that a design for the Internet much less expensive and much more intuitive. So thanks, Adobe for doing things in the right direction.

    That said, I think Muse is always incredibly full of bugs, and working with her is far from being as smooth as it should be now that users are required to pay a monthly fee. I'm still on the fence about whether to take the plunge at the end of the 30 day trial. (Resolution of this case will go a long way to convince me.)

    Widgets have proven one of the tools more difficult to manage in the arsenal of the Muse, which is what brings me here tonight. The problem I have is the scaling and positioning of the images using the slide show - and have it stay like that.

    I am able to move the image of Heroes (largest) then it is placed and scaled properly, but I can only do this with a single image at a time. As soon as I'll do to evolve a second hero image to match the first one returns to the default size and the introduction and the second is correct.

    As shown in the first selection of the screen, the image of hero on the right is sized correctly to align with the top and bottom of the thumbnail grid.

    Screen Shot 2012-06-20 at 12.16.42 AM.png

    But it will happen only this trick once. All other images of Heroes change size, move to the Center or the float everywhere where they wish, as shown below.

    Screen Shot 2012-06-20 at 12.16.27 AM.png

    It is a model that is extremely frustrating, and if cannot be resolved, I'll have to give up Muse as the solution to this design problem.

    Help, please! (Thank you.)



    OK, I finally diagnosed the problem, the solution was not very intuitive. In fact, I realized only the answer when I went on the site for export as HTML.

    Because the images of Heroes was put across the slightly larger that the suggested size, I discovered that if you go to the assets Panel and right click on the title of the image (which has a small plus sign next to it to indicate the difference in size), it invites you to "import more large size of the image" (maybe this isn't the precise language (, but it is an option that sounds almost exactly like that).

    Once you do this for each image, they are no longer returned to the small size or random placement. They're going where they are supposed to and they seem to stay there.

    So I'm happy to announce, case closed.

  • Functions the discoverer of the elements using the full name?

    Hello everyone,

    I had a problem today using the discoverer administrator, while creating an element using a Trim function on the element used in the condition of the reports, when I check the SQL code, it uses the fully qualified name that is SYS. STANDARD. Trim (Item) instead of just the TRIM (ITEM) which makes a huge difference in the duration of the query.

    For example:

    Items in the folder:
    CHECK_CODE1, CHECK_CODE2, CHECK_CODE3

    New item you want:
    ALLCHECKCODES = TRIM (CHECK_CODE1) | » _'|| TRIM (CHECK_CODE2) | » _'|| TRIM (CHECK_CODE3)

    Condition:
    ALLCHECKCODES LIKE '% 1234% '

    This is the Sql that is generated:

    Select...
    Of
    < table_name >
    where
    SYS. STANDARD. TRIM (CHECK_CODE1) | » _'|| SYS. STANDARD. TRIM (CHECK_CODE2) | » _'|| SYS. STANDARD. TRIM (CHECK_CODE3) LIKE '% 1234% ';

    With the creation of element when I create a condition using the Trim function it is displayed correctly:

    ... where
    TRIM (CHECK_CODE1) | » _'|| TRIM (CHECK_CODE2) | » _'|| TRIM (CHECK_CODE3) LIKE '% 1234% ';

    Is it possible that we delimit the Discoverer administrator to build the regular element using Trim instead of the fully qualified name for the function?

    Enjoy your entries and your advice.

    Thank you.

    Vlaminck

    Hello

    The problem is that the TRIM does not use the syntax of the standard setting and therefore normally does not appear in the EUL. If the PAD has been imported into the EUL then you might find the TRIM function in Disco administrator under Save the PL/SQL functions and then remove the SYS and the STANDARD of the owner and package.

    Otherwise, I should just use LTRIM (RTRIM (.)) like LTRIM and RTRIM use the normal parameter syntax.

    Rod West

  • Show or hide the buttons of the model using JavaScript

    Can someone tell me to know to disable, show and hide the buttons of the model using JavaScript? In my case, I use AJAX for validation and the validation failed, I want to deprive the person's ability to submit the form. I did successfully using the HTML buttons but they seem ugly and do not correspond to the theme of the application. I really want to do using the model based buttons. Anyone know the answer to that?

    You can find that here:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:143

    The only problem you have to solve is to assign an id to each template button. Rather than use an id string coded hard = "buttonHide1" as in my example, you could use id = "" #LABEL # "If there are a lot of different buttons you need to display / hide on a single page." However, at the same time make sure that the processes are also conditional and follow the logic. To hide a button, this isn't a guarantee that a process can not be executed.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Access to the value of the application using javascript

    How can we access the value of the APPLICATION using javascript? I tried $x ('REQUEST'), but it does not work.

    Thank you

    Hello

    If you use & ASK. (including the & and the.) in your javascript directly it will be replaced by Apex with the value of the actual demand

    Andy

  • Position of the element in the array of Boolean

    Hello

    I have an array of Boolean, whose elements are initialized to false. For example,.
    private boolean array[] = new boolean[10];
    Subsequently, I put an element of the array to true. Let's say that
    array[5] = true;
    My question is how can I get the position of the whole of the element whose: value (s) was/is real? Is there a method that does this? I looked in the class of paintings, but could not find anything.

    Thanks in advance.

    There is no built-in function. Just write the code yourself, it is not difficult. Simply iterate on the table and when you find a true value, you have found your index.

  • Position of the element on the page

    Hi - I'm still pretty new to LiveCycle so hopefully it'll be easy.

    I produce a PDF and I am trying to get information on each element to put in bookmarks XML so that I can bookmark the PDF dynamically.

    I found that I can use xfa.layout.page (this) in the script of layout: ready to get the page number of each article, but I can't work, how to get the position of each element on the page.  All I can find are this.x/this.y and xfa.layout.x (this) / xfa.layout.x (this), but those will be 0,0 - which I think is because the element is located at the top left of the element that contains.

    Does anyone know how to get the position of an element on the page?

    Thank you

    Dan

    Hi Dan,.

    John Brinkman has x, y of the samples on his blog: http://blogs.adobe.com/formfeed/category/transpromo

    I have here a sample that accesses the x, y position of the objects and mouse, which can help.

    http://cookbooks.Adobe.com/post_Moving_Objects_Around_a_Form-16519.html

    and

    http://assurehsc.IE/blog/index.php/2010/05/moving-objects-around-a-form/

    You are right that the coordinates are based on the top/left of the container. When you work with coordinates I tend to set the container of the Page master at 0,0, so that all objects are then based on this.

    Good luck

    Niall

  • Position of the element, no focused

    In my login page, I have the username and password elements and a background image.
    the elements of user name and password are not centered, how to change their display position?

    I have placed them in #REGION_POSITION_08 #, (using the theme 15). No matter what region, I chose, they are all not centered horizontally.

    Instead of:

    ---------------------------------------------username------------------------------------------------

    It displays:

    -------------------username--------------------------------------------------------------------------

    Thanks for any help,
    Yivon

    Create a copy of a region in your templates / type of region. Change the model by adding the following to this part of the html template:

    #BODY #.

    Apply this model of region in your area on your login page. Your items will be placed in the center of the region.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Dynamically change the position of the element

    I am a beginner on flex, sorry if the question seems obvious.
    I have a label and a button:
    < mx:Label x = "10" y = "9" text = "this is my message text" id = "myMessage" / >
    < mx:Button label = "My button" left = "109" top = "9" id = "myButton" width = "72" / >

    The label text changes dynamically from actionscript. How can I change the position of the button to always be AFTER the text of the label and not at the point of intersection?

    Thank you

    Great!

    Everything works fine now, using HBox and automatic layout.

    Thank you

  • Find the element of object styles, and then copy it

    Hello, I would like to create a script.

    Find elements of object styles:

    Outside of the document, I create on block with the style of the object "reference". It will be unique.

    Once selected, I want to put it on the Clipboard or simply make a copy.

    If selected by object styles is not possible, how can I do an id on my element?

    Can you help me?

    Thancks a lot!

    YES!

    I solved the problem like this:

    var obj1 = app.selection [1];

    var obj2 = app.selection [0];

    Alert (obj1 and obj2);

    obj1. Select();

    App.Copy ();

    app.loadFindChangeQuery ("PuceSimple_enPuceCouleur_Courant", SearchModes.grepSearch);

    obj2.changeGrep ();

    But I have a question.

    How the script knows which is the number 0 and the number 1?

    This is the order of selection? in position on the page?

    Could be done as follows:

    var obj1 is app. Docuement.Item ("reference");

    var obj2 = app.selection [0];

  • copy of XSLT creates a xml that returns empty while trying to access the elements using XPATH

    Hello

    I'm doing a copy - of the function by using the XSLT in jdev. That's what I do

    < xsl: param name = "appdataDO" / >

    < xsl: template match = "/" >

    < ns1:applicationData >

    < ns1:applicationId >

    < xsl: value-of select = "$appdataDO / ns1:applicationData / ns1:applicationId" / >

    < / ns1:applicationId >

    < xsl: copy-of select = "/ fslo:ExternalapplicationData / fslo:ApplicationsHDRAddInfo" >

    < / xsl: Copy - of >

    < / ns1:applicationData >

    < / xsl: template >

    < / xsl: stylesheet >

    After that, I can see the document created in the flow of process like this:

    < ns1:applicationData >

    < ns1:applicationId > MMMM < / ns1:applicationId >

    < ns2:ApplicationsHDRAddInfo >

    < ns3:genericFromBasePrimitive > iuoui < / ns3:genericFromBasePrimitive >

    < ns4:EstimatedMarketValue > 77 < / ns4:EstimatedMarketValue >

    Jih < ns4:PropertyInsuranceFee > < / ns4:PropertyInsuranceFee >

    hjh < ns4:LoanOriginationFee > < / ns4:LoanOriginationFee >

    KKKKK < ns4:RegistrarFee > < / ns4:RegistrarFee >

    hjh < ns4:LoanCashInFee > < / ns4:LoanCashInFee >

    < ns4:LoanPaidInCashFlag > cddffgd < / ns4:LoanPaidInCashFlag >

    < / ns2:ApplicationsHDRAddInfo >

    < / ns1:applicationData >

    But whenever I am trying to extract all nodes output I get an empty result. I can copy the whole dataset in the same type of variable.

    But I am unable to get the individual elements using XPATH.

    I tried to use the exslt for all nodes and xslt 2.0 without success.

    Namespaces may be the culprit here. The test in the jdev method can produce a result, but during the execution, the xpath expression returns empty.

    I created another transformation where I try to copy the data from the DataObject precious a simple string in an another data object.

    This is the test sample source xml transformation created by jdev when testing with all the namespaces, where I try to copy the data into a simple string in an another data object.

    " < applicationData xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: schemaLocation =" http://xmlns.Oracle.com/bpmpa/FS/ulo/types file:/C:/JDeveloper/NewAPP/Xfrm/xsd/ApplicationData.xsd "xmlns =" http://xmlns.Oracle.com/bpmpa/FS/ulo/types "> "

    applicationId289 < applicationId > < / applicationId >

    < ApplicationsHDRAddInfo >

    " < genericFromBasePrimitive xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/types/BasePrimitive "> genericFromBasePrimitive290 < / genericFromBasePrimitive > .

    " < EstimatedMarketValue xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> 291 < / EstimatedMarketValue > .

    " < PropertyInsuranceFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> PropertyInsuranceFee292 < / PropertyInsuranceFee > .

    " < LoanOriginationFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> LoanOriginationFee293 < / LoanOriginationFee > .

    " < RegistrarFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> RegistrarFee294 < / RegistrarFee > .

    " < LoanCashInFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> LoanCashInFee295 < / LoanCashInFee > .

    " < LoanPaidInCashFlag xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> LoanPaidInCashFlag296 < / LoanPaidInCashFlag > .

    < / ApplicationsHDRAddInfo >

    < / applicationData >

    And the xslt transformation

    < xsl: template match = "/" >

    < ns1:DefaultOutput >

    < ns1:attribute1 >

    < xsl: value-of select = "/ fslo:applicationData / fslo:ApplicationsHDRAddInfo / custom: LoanOriginationFee" / >

    < / ns1:attribute1 >

    < / ns1:DefaultOutput >

    < / xsl: template >

    The result is an empty attribute1. Any help will be appreciated.

    Please remove attributeFormDefault = "qualified" elementFormDefault = "qualified" in your XSD

    Please visit the following link:

    http://www.oraclefromguatemala.com.gt/?p=34

  • How to get the value of the global element using javascript or ajax!

    Hello!

    How can I read at global(point application created in the shared components) using ajax or javascript?
    You can imagine that I need to get the value of this element by function as:
    -----
    Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;}  Return itemVal; }
    -----
    .. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
    I know that I can make point page and read the value of that, but not what I really need!
    If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!

    Please, share your ideas!

    THX

    Rafix,

    You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.

    1 set up a JavaScript function that can be called by:

    This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.

    Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.

    getAppItem = function(pItemName){
        var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId'));
        get.addParam('x01',pItemName);
        gReturn = get.get();
        get = null;
        return gReturn;
    }
    

    2. creating an application on request process:

    The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);

    go to the shared components > procedures > Create.

    Point process: "We Demand: run this application...". »
    Name: GET_APP_ITEM
    Type: Anonymous PL/SQL block

    declare
       -- get the item name passed into the JavaScript function.
       app_item_name varchar2(30) := apex_application.g_x01;
    begin
        -- print its value to the buffer
        htp.p(v(app_item_name));
    end;
    

    3. call the JavaScript function with dynamic action:

    The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.

    $s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
    

    See you soon,.
    Janet Tyson

  • hide the element without javascript

    I have the form for an article that has its default value.

    I try hide the element in a state average and ordinary wirh too... but after action insert it doen't register any value

    I don't want to use javascript to hide. so...

    is it possible to hide point without javascript, so it will not lose its value after insert action?

    For the selected condition type, you must specify a "point-name" in Expression1

    CITY

Maybe you are looking for

  • Is there an easy way to copy my mail to another Mac rules?

    I have a desktop Mac and a Mac laptop and use both mail. I have collected some rules on the Mac desktop and now I want to use on the laptop. Is it possible to copy the rules of mail from my Mac desktop to the laptop? Or (even better) I can synchroniz

  • Satellite A100 - 233 PSAA8E - need controller driver Ethernet & network

    Hello!I have a Toshiba Satellite A100-233 model No. PSAA8E-061022AR.I looked on http://gulf.computers.toshiba-europe.com/innovation/download_drivers_bios.jsp?LNG=13&service=AE&mode=a llMachines & action = search & teddProduct = 653 & selShortM od = 4

  • My Windows XP GMA 3100 monitor goes black randomly and returns

    Can someone help me get rid of this nuisance? The connection has no problem. Recently my screen becomes black and returns to normal and usually takes a lot of time to come back :/ I can move my mouse and type using the keyboard and do normal stuff as

  • Move the computer system to a new disk

    I have a 6 year system, I built and it's time to upgrade.  New system uses MB P9X79Pro Asus with Intel I7 3930.  I want to take the drive system (SDS) from my old computer and install it in the new computer, and then upgrade to Windows 8 Pro on the n

  • CS6 Production Premium: change the product key of victory for Mac

    Hey there!The chat feature does not work, so I'll try this forum to contact with Adobe.I have Adobe Production Premium CS6 and would like to change my Windows on a Mac - Key key. An assistant of Adobe can contact me please? I don't know another way t