Popup position with javascript.

Hello

I'm trying to display using popup by clicking with the right mouse and using Javascript?  Is there a way to transmit the exact position of the pixel click as an allusion to the show popup method?

If not how do I make the popup to the click position exact mouse using Javascript?

Thank you.

Put some components of 'reference', as the spacer on the page with positioning you want. Then use above function client to display the pop-up window-side. Before the screening, you can also change the reference component positioning


  
    
  
  


  


        
          function showPopup(event) {
              event.cancel();
              var source = event.getSource();
              var popup = source.findComponent("popup");
              var spacer = source.findComponent("s1");
              alert(spacer);
              popup.show( {
                  align : "after_end", alignId : spacer.getClientId()
              });
          }
        

Tags: Java

Similar Questions

  • Open and close the Popup with Javascript

    Using Apex 3.2

    I probably have done this lots of times in my old job, but do not have access to the code and now I can't work properly.

    I opened a window pop up with javascript
    Now, I need to close and refresh the calling page, but only if it ratifies the validation on the popup.
    I have an item hidden on my pop up called P7_FLAG.
    I have a process page after validation that affects P7_FLAG (only the value 1, if passes validation).
    I also have a "SUBMIT" button.

    So once I click my button "SUBMIT" page should look at validations, so ok, P7_FLAG the value 1, then close the popup and refresh the calling page.

    My current look of javascript like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    {
    window.close();
    window.opener.doSubmit('REFRESH');
    }
    }
    </script>
    My button
    javascript:saveChanges();
    The problem is that I need to click twice on the button SUBMIT.
    First, it sets P7_FLAG
    Second time, it closes page and refreshes.

    I probably made a fundamental mistake, but today I can't.

    See you soon

    Gus

    Published by: Gus C 10 may 2012 12:48

    Sorry about that I was blind

    Add this function to your page

    
    

    Call this function on the loading of the page

    onload="onloadclose();"
    
  • How to display the note for a cell of table with javascript?

    My goal is to do it with javascript. No manipulation of the side server.

    < af:table id = "t1" >
    < af:column id = "c1" >
    < af:outputText id = "ot1" >...
    < af:clientListner ...method="showpopup"/ >
    < /... >
    < /... >
    < /... >

    ....

    < af:popup id = "p1" >
    < af:noteWindow id = ot2 >
    here to show the value of ot1
    < /... >
    < /... >


    function showPopup (e) {}
    var text is e.getSource () .getValue ();.
    var popup is e.getSource (.findComponent("::p1"));.
    now, how to upgrade the content of the notewindow?
    Popup.Show ();
    }

    Hello

    You can try with something like that.

                   
                        
                    
    
                    
                        
                            
                        
    
                    
                    
                        function showPopup(evt){
                            var ot1 = AdfPage.PAGE.findComponent("ot1");
                            var text=ot1.getValue();
                            var popup=AdfPage.PAGE.findComponent("p1");
                            var ot2=AdfPage.PAGE.findComponent("ot2");
                            ot2.setValue(text);
                            popup.show();
    
                            }
    
                    
    

    Arun-

  • Alternate slides with JavaScript (or advanced Actions)?

    I was wondering if someone out there with the knowledge of JavaScript could help me a little...

    A colleague came to me with a question about randomization of the slides. We work in Captivate 5.5. The slides are all part of a quiz (but aren't question slides). They have a click box. The idea is that if the user clicks on the box (or off the beaten track), it shows a good (or bad) legend and then jumps to a random slide (new). If the user manages at the end of the slide without selecting anything, their time is running out and they get fried to a random slide and it is regarded as an incorrect answer. The user should see all of the slides in random order, with no recurrence.

    I created a tip Action, integrating the widget of random number, and it works. My problem is that the project has 50 blades, and I'm not sure it is very feasible with advanced Actions. As it is, my test with 3 random slides is an action with 4 conditional statements, so I'm not really looking to create one for 50 slides. (I don't know even if Captivate would be able to handle this).

    Is there a way (judging) to achieve with JavaScript instead? My vague idea based on my very limited knowledge of programming is:

    1. on enter first Captivate slide, create the array of random slides - 1 slide numbers (because cpCmndGotoSlide index starts at 0)
      so if I had a project where I wanted to shoot random slides 3-8, the would be [2, 3, 4, 5, 6, 7]
    2. Shuffle/random table
    3. set up a variable called slideviews = 0 to keep track of how many slides have been seen (and so which item in the table to move to the next randomly)
    4. Create a function that I'm going to run when I want to access a random slide (whether at the end of a slide or in the success or failure of a click on a square)
      something like... If slideviews < array.length, cpCmndGotoSlide = array [slideviews]; slideviews ++; Another thing, cpCmndGotoSlide is 8 (jump at the end of the slides)

    Of course, this lack of things (like the proper syntax and things needed to communicate with captivate)... but is sound logic? Is there a better way to do it?

    Come to think of it, the table and the slideviews variable should be saved if we wanted it works with bookmarking... I think that this project will be SCORM 1.2 LMS System.

    It would be nice to have a variable user I can access within the Captivate project and I can put in a legend to show the script #. Something like scenario = slideviews (I know that's not the syntax, reading series of JavaScript of Jim Leichliter on CaptivateDev.com, but that's the basic idea.)

    Anyway, pointers would be very useful! Thank you.

    Edit: I played a little bit; for randomization, I found a code online, and then I wrote something that automatically creates a table and a function for the jump to a slide randomly. Here's what I have so far (not tested in Captivate yet):

    var objCP = document.Captivate;
    
    var randomNumbers = []; 
    
     // The following creates the values for the array: 3 to 52.
     // I want to randomize slides 4-53, using cpCmndGotoSlide (index starting at 0) to jump to them
    
    for(i=3; i<53; i++) {
                        randomNumbers[i-3] = i;
    }
    
    var n = randomNumbers.length;
      var tempArr = [];
      for (i = 0; i < n-1; i++ ) {
        // The following line removes one random element from arr
        // and pushes it onto tempArr
        tempArr.push(randomNumbers.splice(Math.floor(Math.random()*randomNumbers.length),1)[0]);
      }
      // Push the remaining item onto tempArr
      tempArr.push(randomNumbers[0]);
      randomNumbers=tempArr;
    
    var slideViews = 0;
    
    var randomSlide = function() {
    if (slideViews < 50) {
                        objCP.cpEISetValue("cpCmndGotoSlide", randomNumbers[slideViews]);
                        slideViews++;
                        objCP.cpEISetValue("scenarioNumber", slideViews);
              }
              //after all the slides have been seen, jump to the final results slide
              else {
                        objCP.cpEISetValue("cpCmndGotoSlide", 53);
              }
    };
    

    I doubt it will work off the bat, but maybe this is a beginning?

    I managed to get things working, so I thought I'd post my (probably a little unwieldy and inefficient) code in case people come across this thread and want a starting point:

    var objCP = document. Captivate;
    var randomNumbers = [];
    var slideViews = 0;
    CVS var = 0;

    shuffle var = {function (array)}
    var m = array.length, t, j;
    so that {(m)
    j = Math.floor (Math.random () * m-);
    t = array [m];
    table [m] = array [j];


    table [j] = t;
    }
    };

    var jumpSlide = function() {}
    If (slideViews < randomNumbers.length) {}
    objCP.cpEISetValue ('cpCmndGotoSlide', randomNumbers [slideViews]-1);
    slideViews ++;
    objCP.cpEISetValue ('scenarioNumber', slideViews);
    }
    else {}
    objCP.cpEISetValue ('cpCmndGotoSlide', 52);
    }
    };

    var randomSlide = function() {}
    If (g_objAPI.LMSGetValue ('cmi.comments') = ") {}
    for (i = 3; i < 53; i ++) {}
    randomNumbers [i-3] = i;
    }
    Shuffle (randomNumbers);
    g_objAPI.LMSSetValue ('cmi.comments', randomNumbers);
    resume ++;
    jumpSlide();
    }
    ElseIf (resume = 0) {}
    randomNumbers = g_objAPI.LMSGetValue('cmi.comments').split(',');
    slideViews = objCP.cpEIGetValue ('scenarioNumber');
    resume ++;
    jumpSlide();
    }
    else {}
    jumpSlide();
    }
    };

    The random slide order is stored in cmi.comments, and the position in the sequence is stored in a Captivate variable called scenarioNumber. I could have stored the two variables of Captivate in cmi.suspend_data, but in the end, I liked being able to see the numbers when considering the SCORM data. To work around problems with initialization, I made the creation/restoration of the part of random numbers of the function which climbs to a slide randomly, so nothing is actually executed when entering the first slide.

  • Is no longer able to view live on Alexei_tchernomor even content with javascript active.

    I had no problems until recently - has always been able to view their videos. I never had installed oracle java plug-in, but had javascript activated via subject: config and everything worked properly. Now, I am unable to view the videos on the site with javascript active. I use noscript and java is enabled in the options for this site. Any help would be appreciated. I have the site enabled in my firewall.

    I'm glad that you found the help page because I wasn't going to be able to answer that one.

  • Is it possible to work with JavaScript in JUST ONE TAB and not on others

    I usually browse websites with javascript is disabled. But sites like facebook and youtube need javascript. So what I really want is to just run these sites on legs with active javascript and run the other tabs without it.

    Try noscript. It can be a pain to get the installer at the beginning because you need allow all areas that you want to allow JavaScript for, but that market either tabs or windows.

    https://addons.Mozilla.org/en-us/Firefox/addon/NoScript/

  • How to change rootIndexPath with javascript

    I wish I could change the value of rootIndexPath with javascript. Is this possible?

    I can see the value of rootIndexPath with

    {Label

    text: "" root path Index: "+ listview.rootIndexPath ;}"

    but I can't change the value. Here's the code I'm trying to fix

    example:

    Button {}
    text: 'run '.
    onClicked: {}
    listview.rootIndexPath = 1;
    } //end onClicked

    } //end button

    {To ListView
    rootIndexPath: [2]
    ID: listview
    dataModel: {XmlDataModel}
    Source: "simplelist.xml".
    } //end dataModel

    } //end listview

    Have you tried with:

    listview.rootIndexPath=[1];
    

    Alternatively, tou can try with:

    var tmp = rootIndexPath;
    tmp[0] = 1;
    rootIndexPath = tmp;
    

    or maybe with:

    listview.setRootIndexPath( [1] );
    

    Let me know

  • Position screen Popup (positioning)

    Hello!

    I work with the 8820 model. and the last time I tried to created screen as he takes care of not any physical display, but

    only a part of it; such as indicators (level of the dough, the GSM signal strength, clock, etc.) are still visible on the top of the screen. An example is a standard alarm application, which comes with all devices.

    However, I couldn't do - main screens still occupy all discplay. and they advised me to use instead the pop-up screens.

    I use pop-up screen, but my problem is that she is always all display. Even if I replace sublayot and try to reposition, reposition it, but the background remains white. as if I inserted a screen empty and then inserted my popup. I don't understand why.

    I need popup screen with the display as a main screen list of my application. and at the same time, I wish that it be small, such as

    the user can see clock, indicators, etc., exactly as the standard alarm application

    could you help me please?

    Thank you

    Sandrine

    Thank you all for your answers. It seems that I must make my own header like Bika suggested.

    Basically, I want to do exactly same thing as Bika described.

    but I wanted to let the system header and avoid attracting the custom header. However, it seems that if I use HeaderBar, the end result is the same.

    I tried to use
    Ui.getUiEngine () .pushGlobalScreen (new PopupScreen (vertManager), 1, UiEngine.GLOBAL_QUEUE);

    I'm not using USE_ALL_WIDTH. However, it is always appears as a small window on the big white screen which occupies
    Physics show all.

    I'll try to use HeaderBar, as it seems the only way.

    in any case, thank you all for your help.  This forum is the most useful that I've ever seen. I hope that my experience grows,
    I will pay back to the community.

    I'm marking this thread as fixed.

  • ADF - image source Set with JavaScript

    Hello.

    I have a layout grid panel with multiple lines and cells.

    Each cell contains a text and a picture, all surrounded by a command binding.

    My output text have the value #{MyBean.valueMyBean}

    My image have the source /directory1/directory2 / # {MyBean.valueMyBean} .jpg

    What I want is that whenever I click on that image, image and its corresponding output text takes the same value (simulating the selected item)

    I want to do with JavaScript, because when I do it with partial triggers there is a delay, and it does not work for the needs.

    Could you help me put who implemented?

    I don't have an idea to change the source of an image with JavaScript.

    You can join af:clientListener for the image and call the javascript function that will be:

    -find the component target, something like: var targetImg = AdfPage.PAGE.findComponent (clientId);

    -change the property 'source', something like: targetImg.setSource ("new source");

    Here you can find more information about adf api client-side: http://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_arch.htm#ADFUI10042

    Dario

  • Client with JavaScript listener, surrounded by a button have a delay

    Hello.

    I have a fragment page (jsff) with a resulting keypad buttons surrounded by a client listener that calls a java script function; whenever I click on a number it refresh a text with the concatenated value input. I've implemented with JavaScript. Why with JavaScript? Because of the delay using partial triggers showing the value in the input text.

    When I test it on the server, it works fine. I click on each button and have a little late, but it works for the needs to develop.

    Now, when I insert this fragment inside an another jsff which include several elements, the result is not the same. I click every button and the value is displayed in the text of entry very fast, but the I clicked on the button takes between one and two seconds to recharge for summer clicked again. I don't understand what is happening.

    Could someone help me?


    Thank you very much.

    Probably you always spread the event on the server. You can easily check this with a browser like Firefox/Firebug plugin, sent to see if there is no request for the server.

    Normally, you will need to explicitly cancel the event to propagate to the server. For example, if you have a clientListener on a button, you do something like below:

    function showPopupFromAction(actionEvent)
    {
      actionEvent.cancel();
    //your logic here

    }

  • Is it possible with javascript to compile the data entered by the user in an easy format to excel?

    I have a form in which the user enters several lines of data as well as additional information on these data.  I would like finally to export data, so I can manipulate the Excel.  This is possible because javascript (or otherwise)?  Here is an example of what I mean.

    The form of a table in which the user enters each of the names of his friend, their favorite color and their age.  I want the name of the specific friend linked to their favorite color and age so when I export to excel I can see how many friends has the user whose favorite color is red.

    If the form data would be as follows:

    Friend1name

    Friend2name

    Friend3name

    Friend1color

    Friend2color

    Friend3color

    Friend1age

    Friend2age

    Friend3age

    When I export the data as entered above, the results of each field in another column.

    Anyone has any ideas for that?

    It is possible with JavaScript. You can write the data to the JavaScript console and then copy & paste into Excel, or write to a file as an attachment (aka data object) and export it. Here's a sample script that writes the field data in the JavaScript console:

    Table of domain names

    Invoke the var = ['Friend1name', 'Friend2name', 'Friend3name', 'Friend1color', 'Friend2color', 'Friend3color', 'Friend1age', 'Friend2age', 'Friend3age'];

    Browse the fields and write the field values in the console

    for (var i = 0; i)< afields.length;="" i="" +="1)">

    Console.println (getField(aFields[i]).valueAsString);

    }

    Display console

    Console.Show ();

    You can place this code in the mouse event to the top of a button and click the button to run it. This last line of code displays the console and you will be able to copy & paste the data.

  • I'm trying to generate an arithmetic and geometric series/sequence with JavaScript.

    I try to generate an average arithmetic and geometric
    series/sequence with JavaScript. The thing that makes this challenge is that
    I use user input to determine the parts of the formula that I use for
    generate each sequence. I tried running the formulas, but I learned that I was
    channels running through them and not numbers. How to generate my
    sequences/series and always use user input? PS, here's my formulas: (a1-East
    first term, d and r are difference/ratio, and n is the n-th term)

    1.) a1 + d * n  

    2.)a1 * r^n

    Entry user of a form is always a string. There are several ways to convert a string to a number in JavaScript:

    • Pass it as an argument to Number()
    • Pass it as an argument to parseInt() (for an integer)
    • Pass it as an argument to parseFloat() (for a floating-point number)
  • Text form field properties: access with Javascript?

    Hello

    I wonder if it is possible to access all of the properties of text form field with Javascript.

    The basic game is available under the domain object, but I'm looking for the other stuff that does not specifically exist for the fields of rich text, such as the properties of next paragraph:

    Dashes (left and right, withdrawal, first to the first line indent), the vertical alignment (top, bottom, middle), space above and below and attack (line spacing).

    All this is available if you place your cursor in a rich text field and press Ctrl-E to open text form field properties, then click on "More".

    So I wonder if it is also accessible via JS, because I can't find anything in the documentation on the subject.

    Thanks much for any help!

    Ariel

    Some properties of rich text are available, but not those you mentioned.

    I'm afraid.

    Study of the Span object to find out which ones are.

  • Customers able to avoid paying shipping with Javascript disabled

    A customer has reported customers in full case without paying shipping costs.  The site uses USPS to calculate shipping costs.

    The following code is used in the basket of a user to calculate shipping costs {tag_shippingoptions, false, ShipToSingleCountry, US, false, false}

    I spent a test with Javascript disabled command and has been able to bypass the selection of one of the values of shipment required as a result of no value showing actually.  Is there a job recommended around this option to prevent users from manipulating the system to avoid shipping charges?

    Thank you!

    You can hide the payment button if javascript is disabled, and replace it with a message that javascript must be activated at the cash register. Not the best solution, but it works.

  • How to call the java function with javascript setting in mobile adf?

    How to call the java function with javascript setting in mobile adf?

    The ADF Mobile utility container API can be used from JavaScript or Java.

    Application container API - 11 g Release 2 (11.1.2.4.0)

Maybe you are looking for

  • Inactive newspapers in box

    After a short break away, (3 months) I returned and updated my Skype version 7... and even if the lanyard box appears, it will accept no entry whatsoever. I have reset Skype, uninstalled and reinstalled twice, without success. No newspaper in the Sky

  • Satellite M30: Lack of reader DVD-CD ROM D:

    MY COMPUTER SATELLITE M30 IS MISSING, perhaps DAMAGED, the EQUIPMENT RELATIVE to the UNIT DISC DVD-CD. I TRIED TO CANCELED AND REINSTALLED, BUT THE MESSAGE FOLLOWING ERROR APPEARS: "DVD-CD ROM UNIT NOT CONNECTED." SO FOR NOW I HAVE C: DRIVE UNIQUE FI

  • create the reference with the legend Info

    Hello I have on my side of a large number of controls, 152. I have an array of items with a value of 152. I want to load the values in the controls on the right. All controls have a legend with the same value as the index of the element. Is it possib

  • How to get my box to connect to a server to connect to the server. With the help of 2002 XP pro service Pack 3

    What should I do to connect to a server to connect to the server. I use XP pro 2002 Service Pack 3.At this point my XP Pro SP3 2002, area has several parameters of user accounts in the box. The journal of users on the box, not the server, how can I r

  • Photo Gallery help

    I recently finished several sessions with a representative from microsoft on how to use the photo gallery. He said to the first register with microsoft that I did. Then he said that I would be able to download the pictures with windows 7 or vista, an