Java script is not working while coming back to the page.

Hi Experts,
I am working in jdev 11.1.1.3.0 with ADF BC.
I am callling javascript in my jsff, while this javascrip is invoking file download method. this java script i am inovking from another button action, because in some case i need to invoke popup and some case i need to invoke file download for this i have taken one button in that button i am invoking these 2 based on some condition. everything is working fine except if i move another jsff and come back to this jsff then the file download is not happening.
can any one tell me what is the issue here.
java script:
function customHandler(event) {
var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId("pt1:pt_region0:1:cb1")
var actionEvent = new AdfActionEvent(exportCmd);
actionEvent.noResponseExpected();
actionEvent.queue();
java bean:
if(downloadFile!=null){
System.out.println("invoking downloads...............................");
erks.addScript(context, "customHandler();");
} if (requestClause != null){
System.out.println("invoke popup");
executeSactionCheckVO(requestClause);
ADFUtils.invokePopup(this.getP2().getClientId(FacesContext.getCurrentInstance()));
Here my bean is in backing bean scope.
can any one help what may be the issue here. or if you can tell me how to call file download method from backing that can be great help full to me.
Edited by: user5802014 on Aug 27, 2010 1:52 PM

Hi:
So it's the "erks.addScript(context, "customHandler();");" may not work properly the next time coming back from another jsff.
And very likely the statement of: var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId("pt1:pt_region0:1:cb1") in your javascript command gave you error. Are you sure that "pt1:pt_resion0:1:cb1" is valid all the time no matter how the page is rendered?
Please mark my answer as 'Helpful' if it helps.
Thanks,
Alex

Similar Messages

  • Java script is not working in custom tabular form

    hai all,
    i have changed my built in tabular form to custom tabular form.my java script is coding working fine in built in tabular form . But in my custom tabular form java script is not working ,since it is created as standard report(Display As).
    pls help me.
    with thanks and regards
    sivakumar.G

    Is the appostrophe function test(pthis) *'* present in your javascript code...
    If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
    Regards,
    Shijesh

  • Mozilla is lying when it says Java Script is unnecessary for the avcrage user.Java script is not working in Firefox 7.01

    I want to roll back to an earlier version Firefox that works with Java Script how can I do this. Where I can download an earlier version? You know what the problems are. I am NOT going to list them. Own up to your errors. You made an incorrect conscious decision to break with Java compatibility.

    Mozilla is not lying about average users, but it shows contempt for experienced users, or those that want to be able to get the more out of their browser, or use it for work or school.
    Java and JavaScript are not the same thing. I trust you are referring to JavaScript problems and a lot of collateral damage associated with the mess.
    # Prohibition on Webpages being able to resize or move windows with JavaScript
    # Prohibition on Users being able to move or resize windows with JavaScript
    # Ignoring the fact that there were already user controls in Tools > Options > Content > Javascript > Advanced
    # Making JavaScript inoperable from Location bar as a command, or in a keyword shortcut that involves moving resizing windows
    # Destroying use of AwesomeBar search, Bookmark searching for bookmarks containing JavaScript, making internal searches very unreliable
    Firefox 8 comes out November the 8th and it nor later versions show any reversal of this mess.
    Firefox 3.6.* should remain safe to use for some time, as corporate users will not put up with nonsense when they support thousands of users.
    For those that really need an older version of Firefox [ftp://ftp.mozilla.org/pub/firefox/releases releases] (all releases, including 4.0.1 and 5.0) or with the latest of [http://www.mozilla.com/en-US/firefox/all-older.html Firefox 3]. Mac OSX 10.4 users can't upgrade to 4.0.1
    When you reinstall a different version, at the end of the install, don't let the install start Firefox for you, rather exit, and then start Firefox in the normal manner to avoid inadvertently creating and using a new profile without your bookmarks, etc.
    What would be better would be to use multiple versions / profiles at the same time, which is certainly beyond average users, particularly when Mozilla has historically and purposely made such things difficult. But if interested see [http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox Using multiple profiles - Firefox - MozillaZine Knowledge Base]

  • Creative zen V+ still not working after coming back from assistance for the second ti

    hallo, what thje hell is happening with creative Zen V+ I got it back from assistance for the second time and it's still not working!!!!!!!!!!! I want my money back now, I'm gonna spam the whole of the internet with this unfunny joke, what the hell I'm suppoised to do I really fed up, since I bought the unit it worked for less than one month and for another one it's been back to the assistance for two times!!!! And still it's not working!!!! Now let me tell you this creative zen V + is a worthless, costly, cheap piece of crap, and I mean crap, what the hell am I supposed to do now Send it back for the third time 249 euros for this crappy piece of cheapo plastic Please is it allowed me to send it back and having in change some olther player I don't mean it to be trendy or flashy or all of the usual marketing **bleep** coming with these, I just want a player that actually play my music, a player I can load all my music without the application to freeze, the player to freeze and me having to format and reboot again and again. Is it creative capable to accomplish such task, do they still know how to build an mp3 player that actually work without me having to buy and install windows vista Or they don't Do creative have some old player still in stock zen touch wasn't stilish but worked well until the HD dyied, zen V plus isn't working as it is supposed to do, plain and simple. What do I have to do now in case you are wondering the malfunction is still the same.

    For the Zen V, as it states on the box, you need Windows XP Service Pack or 2, or Windows Vista. You also need Windows Media Player 0 or . As long as you have that, you should be fine there.
    You may also have a corrupted file that is causing the problem. Try not transferring them all at once, transfer it in blocks instead. If one block fails to transfer, try and narrow it down and see if it's a specific file in that block causing the problem.
    When you try it on another PC, do be sure that PC meets the system requirements, especially the Service Pack if it's Windows XP. You'd be shocked how many times people try it on a 2nd computer, get angry when it doesn't work, call tech support, and find out the 2nd PC doesn't even have SP on it.
    All else failing of course contact Support. They can't help you if you don't let them know what's going on, and if you don't yell at them they'll do their absolute best, trust me.
    Good luck,
    Dale

  • Java Script Code not working properly for visios in sharepoint 2013

    Hi all ,
                 I have few visios and I am using the visio web part to display and to redirect from one visio to other visio I am using the java script code through content editor web part . 
    In share point 2010 it's working fine , I was able to redirect to all the visios and code is working fine .
    In share point 2013 its not the same , Its not working properly . only for the first time the code is working fine . once it goes to next visio the code stops working . 
    For example if i click in visio A it gets redirect to Visio B and its stops working , it wont allow to do any other steps . 
    I have checked with the URL its correct , I am not able to find any error also .
    Indresh

    This will be likely caused by the Minimal Download Strategy not registering the Javascript on the page reload. You can turn off the MDS feature to test this.
    You can either turn off MDS in your site, or register your Javascript functions with MDS to ensure they are called. To do this, you'll need all of your code to be wrapped in a javascript file (Embed this on the page using a <script> tag and
    inside that file in a function, which you then register with MDS as follows (I usually do this in the first line of the javascript file):-
    RegisterModuleInit("/SiteAssets/YourJavaScriptFile.js", NameOfYourFunction);
    Regards
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Java script is not working in Chrome

    The code below works fine on IE and FF but not on Google Chrome.
    Please can someone help me to find out the mistake?.    Thanks In Advance.
    Flex Code:
    Public function init():void
    ExternalInterface.addCallback("getCloseConfirmMessage", closeConfirmMessage);
    ExternalInterface.call("setUpBeforeUnload",FlexGlobals.topLevelApplication.id);
    Public function closeConfirmMessage():void
          //Code Here
    Java Script :
      <script language="javascript" type="text/javascript">
                    var fxControl;
                    function confirmClose()
    alert("Please click OK to end the session");
    fxControl.getCloseConfirmMessage();                  
                    function setUpBeforeUnload( appName )
                                    fxControl = document[ appName ] || window[ appName ];                       
                                  window.onbeforeunload = confirmClose;
    </script>

    Is the appostrophe function test(pthis) *'* present in your javascript code...
    If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
    Regards,
    Shijesh

  • Java script will not work after creating new page

    I am using dreamweaver cs3 and have a java script to rotate a banner in a template.  This script has worked fine in the past when I created pages in Dreamwever.  Now the  script works fine only when I test it in a template but when I try to upload to my ISP the script will no longer work.  At first I thought it was the ISP made changes but the person who sits next to me running the same version of Dreamweaver can create a page and the java works.  The java is placed in a template, tested by viewing in a brower and it works, however once I try to create a new page using the template the scriipt will not work.  To get around this I have the person sitting next to me save my template and then I can create pages.  Also if I save the template with my pc and it updates the pages created by the template the java will no longer work.
    This is very frustrating as I cannot create or modify my template on this pc.  What would prevent this from working?

    OK - now we are on to something ..... the script on the template only contains:
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]);
      setTimeout('randomImages()', delay);
    However when I create a new page from the template with this javascript in it the code changes to:
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]imgs[i]);
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]);
      setTimeout('randomImages()', delay);

  • Why is a css 'display:inline;' command not working in one part of the page when it does in another?

    I am trying to set my navigation links to be in a line rather than a column after setting them up as an Unordered List. I have already done it for the social network icons but the same css command just won't apply itself for the navigation. Any help would be appreciated.
    Here is a copy of the page followed by the relevent protion of the css file, the problem occurs with the styles.css applying to the 'topnav' section:
    <!DOCTYPE HTML>
    <html>
    <head>
        <link href="css/styles.css" rel="stylesheet" type="text/css" media="screen">
        <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="content-type" content="cache" />
        <meta name="robots" content="INDEX, FOLLOW" />
        <meta name="keywords" content="Enter Keywords" />
        <meta name="description" content="Description Here" />
        <title>Hittite Education by Weirdbeardink</title>
    </head>
    <body>
    <div id="outer">
        <div id="wrapper">
            <div id="logo">
                <ul>
                    <li><img src="images/Logo-2.jpg" /></li>
               </ul>
            </div>
            <div id="social-media-icons">
                <ul>
                    <li><a href="http:/www.facebook.com"><img src="images/icons/facebook-icon.png" /></a></li>
                    <li><a href="http:/www.twitter.com"><img src="images/icons/twitter-icon.png" /></a></li>
                    <li><a href="#"><img src="images/icons/rss-icon.png" /></a></li>
                </ul>
            </div>
            <div id="topnav">
                <ul>
                    <li><p><a href="index.html">HOME</a></p></li>
                    <li><p><a href="about.html">ABOUT</a></p></li>
                    <li><p><a href="contact.html">CONTACT</a></p></li>
                </ul>
             </div>
            <div id="topstripe">
                <ul>
                    <li><img src="images/stripe.jpg" /></li>
                </ul>
            <div id="picture">
                <ul>
                    <li><img src="images/coverpic500px.jpg" /></li>
                </ul>
            </div>
            <div id="content">
                <ul>
                    <li><h1>Introduction</h1></li>
                    <li><p>This is a unique project undertaken to teach important social topics using sport as the vehicle. Sporting and comedy clips are interspersed with filmed interviews with people like Paul Collingwood, Gary Lineker, Ed Leigh, Faye White and many others. They home in on topics such as teamwork, respect, rules, & money, and they use the pupils' experiences of sport to teach really important lessons about life.</p></li>
                 </ul>
            </div>
            <div id="bottomstripe">
                <ul>
                    <li><img src="images/stripeflip.jpg" /></li>
                </ul>
            </div>
            <div id="footer">
                <ul>
                    <li><p>Copyrite 2011 Hittite Education  |  All rites reserved</p></li>
                </ul>
            </div>
         </div>
    </div>   
    </body>
    </html>
    Here is the portion of the styles.css that works (#social-media-icons) and the portion that doesn't (#topnav):
    #social-media-icons         { float:right; }
    #social-media-icons ul li   { display:inline; }
    #social-media-icons ul      { margin-top:100px; }
    #topnav                { clear:both; }
    #topnav                { width:700px; margin: 0 auto; background-color:#FFF; }
    #topnav ul             { padding:10px; }
    #topnav ul li          { display:inline; }     <!-- THIS IS THE LINE THAT WONT WORK -->
    #topnav ul li a        { padding:0 15px;}
    #topnav    a:link            {color:#000; }
    #topnav    a:visited        {color:#000; }
    #topnav    a:active        {color:#000; }
    #topnav    a:focus            {color:#666; }
    #topnav    a:hover            {color:#F38E00; }

    No need to answer this one as I have had a relpy on another forum. I had <p> tags in the unordered list. Once I took them out it all worked fine

  • Java script does not appear while working in calclulus on the web. It has to show few formulae to start solving the problem

    There is one sentence like "Need a formula to get started". When pointed to it some formula e will appear in same window while using other browser. But in Mozilla that i have , it does not happen

    There is one sentence like "Need a formula to get started". When pointed to it some formula e will appear in same window while using other browser. But in Mozilla that i have , it does not happen

  • Since upgrading to Safari 5.1 some Java scripts are not working, how can I fix this?

    Many thanks for any assistance

    If you did not create this swf yourself then you won't be able to do what I am suggesting.  If you did, then open the fla in Flash and go into the Publish Settings and select the option to publish an html file as an output.  That will create an html page that embeds the Flash file.  Test that file in your browser and see if it plays properly.  IF so, then copy that code in place of whatever Dreamweaver did to embed the Flash.
    Dreamweaver is not a reliable tool for embedding Flash content... why it does not do it the same way Flash does it is anyone's guess.

  • Exception Aggregation is not working while Expanding hierarchy increases the total count

    Hi All ,
    I am working on Headcount report. I need to count the Employee based on the National Insurance no of a Employee so that the Employee will be count only once.
    On query execution query gives a correct result. After expanding the Org. Unit Hierarchy it will show a different result and more than that before expanding in the count column. Attachment is there for reference.
    Regards
    Arvind

    You need to close your resultSets, Statements and Connections before exiting the jsp. That is probably why you are experiencing this problem.

  • Java script does not seem to be working with Firefox 3.6

    I am using Firefox 3.6, and recently installed MAC OS 10.6.5. I had a problem today working on a website and java script would not work with this browser. I was able to work on Safari though...

    To fix this you will need to delete your firefox profile directory to get the new firefox 3.6.13 to work with the java plugin, its a good idea to run an update for java as well before hand. Or you can totally get rid of firefox and the profile directory and load an older version, just turn off automatic firefox updates.

  • Java Script doesn't work on Firefox 8?

    I have noticed that (some) Java Script does not work on Firefox 8.0. Is there a correction for this?

    Yep, go back to what works, appears to be the only real solution. But then you'd hardly be able to use Firefox as nothing is going to get fixed there only get broken.
    What does not work is
    # move, and resize of main window not allowed
    # that include wiping out a lot of keyword shortcuts that do that
    # various additional collateral damage
    The solutions (work arounds) that I can best offer are clumsy but can be found in
    * http://kb.mozillazine.org/Resizing_oversize_window#JavaScript_no_longer_allowed_to_resize_windows

  • Java script not working in 1 pdf, but same script is NOT working in other

    Dear Experts,
    I have a problem with java script.
    I have created 2 PDFs with the same Form name and sub form names.
    I have written a javascript and this script seems to be working in one (Demand2.pdf) and NOT working in the other (Sample.pdf).
    The link for Demand2.pdf is
    https://acrobat.com/#d=XIydWx1RIU4oNdTySHtHfg
    and the link for sample.pdf is
    https://acrobat.com/#d=sKPRs2dtDY57RSvMVtnh3w
    Can you please guide me on this.
    Many Thanks
    BookFans

    Hi,
    The second file (Sample.pdf) is saved as Static. The script is changing the visual appearance of the form (showing and hiding objects). This requires the file to be saved as a Dynamic PDF. This is available in the save-as dialogue under the file name.
    Good luck,
    Niall

  • XML create script is not working in Photoshop.

    Hi All
    Below i have mentioned script is not working. Kindly check and advice. Please do this needful
    #target photoshop;
    var createDefaultXML, createPresetChild, defaultXML, initDDL, presetFile, presetNamesArray, readXML, resPath, win, windowResource, writeXML, xmlData,
      __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
    windowResource = "dialog {  \
        orientation: 'column', \
        alignChildren: ['fill', 'top'],  \
        size:[410, 210], \
        text: 'DropDownList Demo - www.davidebarranca.com',  \
        margins:15, \
        controlsPanel: Panel { \
            orientation: 'column', \
            alignChildren:'right', \
            margins:15, \
            text: 'Controls', \
            controlsGroup: Group {  \
                orientation: 'row', \
                alignChildren:'center', \
                st: StaticText { text: 'Amount:' }, \
                mySlider: Slider { minvalue:0, maxvalue:500, value:300, size:[220,20] }, \
                myText: EditText { text:'300', characters:5, justify:'left'} \
        presetsPanel: Panel { \
            orientation: 'row', \
            alignChildren: 'center', \
            text: 'Presets', \
            margins: 14, \
            presetList: DropDownList {preferredSize: [163,20] }, \
            saveNewPreset: Button { text: 'New', preferredSize: [44,24]}, \
            deletePreset: Button { text: 'Remove', preferredSize: [60,24]}, \
            resetPresets: Button { text: 'Reset', preferredSize: [50,24]} \
        buttonsGroup: Group{\
            alignChildren: 'bottom',\
            cancelButton: Button { text: 'Cancel', properties:{name:'cancel'},size: [60,24], alignment:['right', 'center'] }, \
            applyButton: Button { text: 'Apply', properties:{name:'apply'}, size: [100,24], alignment:['right', 'center'] }, \
    win = new Window(windowResource);
    xmlData = null;
    presetNamesArray = [];
    resPath = File($.fileName).parent;
    presetFile = new File("" + resPath + "/presets.xml");
    defaultXML = <presets>
            <preset default="true">
                <name>select...</name>
                <value></value>
            </preset>
            <preset default="true">
                <name>Default value</name>
                <value>100</value>
            </preset>
            <preset default="true">
                <name>Low value</name>
                <value>10</value>
            </preset>
            <preset default="true">
                <name>High value</name>
                <value>400</value>
            </preset>
        </presets>;
    writeXML = function(xml, file) {
      if (file == null) {
        file = presetFile;
      try {
        file.open("w");
        file.write(xml);
        file.close();
      } catch (e) {
        alert("" + e.message + "\nThere are problems writing the XML file!");
      return true;
    readXML = function(file) {
      var content;
      if (file == null) {
        file = presetFile;
      try {
        file.open('r');
        content = file.read();
        file.close();
        return new XML(content);
      } catch (e) {
        alert("" + e.message + "\nThere are problems reading the XML file!");
      return true;
    createDefaultXML = function() {
      if (!presetFile.exists) {
        writeXML(defaultXML);
        void 0;
      } else {
        presetFile.remove();
        createDefaultXML();
      return true;
    createPresetChild = function(name, value) {
      var child;
      return child = <preset default="false">
                    <name>{name}</name>
                    <value>{value}</value>
                </preset>;
    initDDL = function() {
      var i, nameListLength;
      if (!presetFile.exists) {
        createDefaultXML();
        initDDL();
      xmlData = readXML();
      if (win.presetsPanel.presetList.items.length !== 0) {
        win.presetsPanel.presetList.removeAll();
      nameListLength = xmlData.preset.name.length();
      presetNamesArray.length = 0;
      i = 0;
      while (i < nameListLength) {
        presetNamesArray.push(xmlData.preset.name[i].toString());
        win.presetsPanel.presetList.add("item", xmlData.preset.name[i]);
        i++;
      win.presetsPanel.presetList.selection = win.presetsPanel.presetList.items[0];
      return true;
    win.controlsPanel.controlsGroup.myText.onChange = function() {
      return this.parent.mySlider.value = Number(this.text);
    win.controlsPanel.controlsGroup.mySlider.onChange = function() {
      return this.parent.myText.text = Math.ceil(this.value);
    win.presetsPanel.presetList.onChange = function() {
      if (this.selection !== null && this.selection.index !== 0) {
        win.controlsPanel.controlsGroup.myText.text = xmlData.preset[this.selection.index].value;
        win.controlsPanel.controlsGroup.mySlider.value = Number(xmlData.preset[this.selection.index].value);
      return true;
    win.presetsPanel.resetPresets.onClick = function() {
      if (confirm("Warning\nAre you sure you want to reset the Preset list?", true)) {
        createDefaultXML();
        return initDDL();
    win.presetsPanel.saveNewPreset.onClick = function() {
      var child, presetName;
      presetName = prompt("Give your preset a name!\nYou'll find it in the preset list.", "User Preset", "Save new Preset");
      if (presetName == null) {
        return;
      if (__indexOf.call(presetNamesArray, presetName) >= 0) {
        alert("Duplicate name!\nPlease find another one.");
        win.presetsPanel.saveNewPreset.onClick.call();
      child = createPresetChild(presetName, win.controlsPanel.controlsGroup.myText.text);
      xmlData.appendChild(child);
      writeXML(xmlData);
      initDDL();
      return win.presetsPanel.presetList.selection = win.presetsPanel.presetList.items[win.presetsPanel.presetList.items.length - 1];
    win.presetsPanel.deletePreset.onClick = function() {
      if (xmlData.preset[win.presetsPanel.presetList.selection.index][email protected]() === "true") {
        alert("Can't delete \"" + xmlData.preset[win.presetsPanel.presetList.selection.index].name + "\"\nIt's part of the default set of Presets");
        return;
      if (confirm("Are you sure you want to delete \"" + xmlData.preset[win.presetsPanel.presetList.selection.index].name + "\" preset?\nYou can't undo this.")) {
        delete xmlData.preset[win.presetsPanel.presetList.selection.index];
      writeXML(xmlData);
      return initDDL();
    initDDL();
    win.show();

    You should use the scripting forum. I only hack at Photoshop scripting when I need to.  What I put together is usually made from code I find on the web and modify to do what I want to do. When it come down to it I really don't know javascript.  Your javascript knowledge is way beyond mine.  To tell the truth I don'e even understand the syntax of you first statment after target Photoshop.
    I have a programming background but most of mine was was in design, debugging, and developing programming development tools.  I retired back in 2002.   I never got into Object orientated programming though it was in full swing as was C programming along with java.  Microsoft had given up on its object orientate desktop OS2 system sidetracking IBM with it.
    I did not look closely at your code.  That something you should do. You know more then I do.....
    In the scripting forum you will get better help then I can give you.   Many of the better scriptwriter seem to have left there becase of  frustration with Adobe support. However there are some that still visit there regularly.
    You may want to look into Xtools there open source and the author still visits the forum from time to time. I have use some of his scripts but have never gotten into his library I'm retired I only play a little to keep some brain function. ps-scripts - Browse /xtools at SourceForge.net

Maybe you are looking for