Interactive report Javascript Refresh, working only the first time

Hello

I'm trying to implement a dynamic action on an interactive report that fires a pl/sql procedure and then reload the IR.

I have something like this:

Select par.*,
CASE
WHEN (SELECT 1 OF THE AddressBook ch WHERE ch.usr_id = (select id where email = usr: APP_USER) AND ch.address_id = par.id) IS NOT NULL
THEN ' < img src = "" #IMAGE_PREFIX #wwv_cancel.gif "class alt"Y"="delAddressFromBook"id =" "| par.ID | "" / > "
ELSE ' < img src = "" #IMAGE_PREFIX #add.gif "alt ="N"class ="addAddressToBook"id =" "| par.ID | " » / >"
Mapped END
of nominal addresslist

My dynamic action uses the '.addAddressToBook' jquery selector, and it fires properly the first time I click Add image. My pl/sql code runs correctly and ist updated IR.
It is, when I click the second time in another entry, nothing happens. Looks like the javascript works always something.

Updating of the IR ist done with javascript gReport.pull ().

Thanks in advance.

Florian

Florian,

If you bind an event javascript on an element that is get updated then after that it gets updated, it will no longer be bound to her event. It is possible to use the event to this situation (http://api.jquery.com/on/) delegation, he took advantage of event bubbling (http://www.quirksmode.org/js/events_order.html) and handles the event to an element that is not updated to a kind of AJAX call.

Edit
The following code binds the event listener for the document, but it does that raise the event handler if the initiator of the event matches the selector ".addAddressToBook". I chose the document object, because each page has a document, but you can consider using a parent element that is much closer to the initiator of the event.

//jQuery 1.7+ use "on"
$(document).on("click", ".addAddressToBook", function(event){
    alert('addAddressToBook Clicked');
});

//jQuery1.4.2+ use "delegate"
$(document).delegate(".addAddressToBook", "click", function(event) {
    alert('addAddressToBook Clicked');
});

Good luck
Janet Tyson

Published by: Tyson Janet on January 23, 2012 07:27

Tags: Database

Similar Questions

  • Why my animated themes work only the first time that I open the window? Everyone I tried stops animate if I close the window and open a new one.

    The title pretty much sums up my problem. Basically, I took a few different themes animated to try in the section modules to customize my browser window. They look great in the beginning and in the window that is opened when I activate the theme. However, if I close this window and open a new one, the theme is stationary and is more anime.

    See this support article - https://support.mozilla.org/en-US/kb/animated-theme-stops-working

  • &lt; iframe &gt; link to #anchor work only the second time

    I explore a way to offer a local within a framework of content Web HTML file so that it starts at a specific HTML anchor point rather than the top of the HTML page.

    Now, given that the Web Content overlay of DPS does not support URL + format (e.g. myfile.html #myanchor) of the anchor chain, I thought that I could achieve the desired result by loading an HTML file in the superposition of Web content that points to the HTML file and its anchor named in a tag < iframe >.

    It is where it gets boring. The solution works... but only on the second time you call to the top of the Web content overlay (normally hidden in an MSO).

    The first time I have call the overlay Web Content in my article DPS on the iPad, however, the HTML page but not the specified anchor point, or indeed at the top of the page HTML - instead, it seems to start a little more down the anchor. If I reject the superimposition of Web content (in my case, switch to another State of the object) and return, the HTML code recharge starting at the position of the anchor, exactly as planned. I can close the folio, reopen it and the behavior is always correct. It was only the first time that it fails to do the right thing.

    I am very happy that my solution works on the second, third and every opportunity, but it's very important that readers see first working time.

    I tried to delay automatic playback of the content of the Web, but this makes no difference. The anchor is identified using the tag "id".

    Any ideas?

    Thank you, Neil. But you can ask your guys to withdraw. Someone made me a coffee strong tonight and I realized that I was this approach from the wrong angle. I've seen this number of HTML pages requiring a refresh before you display it correctly in other circumstances, even in Chrome on my computer, so I doubt that it is a specific problem of the DPS - maybe it's something in webkit.

    Anyway, the coffee made me realize that I have an iframe to load another HTML file to an anchor. All I need is to pop a little GoToAnchor script in thetag and a call at the beginning of thetag.

    Someday, if someone corrects completely broken site of Adobe Cookbooks, I download a lot of these recipes.

  • I get an error in XP mode everything works for the first time.

    When you start XP mode (on win 7 ultimate) for the first time. "It makes it to the end of the installation, and then said' didn't install correctly, try again" ive linked result withsame several times.  What can I do to get XP running mode?

    Original title: XP mode (in win7 ultimate) installed, but mistakes so that "fisrt time put in place.

    Hi VeryMetal8,

    I would have you post your query in the TechNet forums because it caters to an audience of it professionals.

    Your request would be more out there.

    Check out the link-

    http://social.technet.Microsoft.com/forums/en-us/w7itprovirt/threads

    Recover if you have questions about Windows in the future. We will be happy to help you.

    Thank you.

  • Menu actions of interactive reports no longer work after the upgrade to 5

    Hi everyone, I just upgraded to 5 Apex 4.2.6 everything went fine except for the interactive reports, the button actions have no effect in the upgraded applications, I have no idea why.  If I create a new page in an application upgrade with an interactive report, it's the same situation, but if a create a new application, the menu actions works in the new page.  Any idea? Thanks in advance.

    Patrick Merci many have responded, you have reason, it was a javascript problem caused by the jquery menu plugin.  I found your comment about it on the page of the plugin and install the new version solves the problem.

    Thanks again.

  • My screen freezes 1 min after that I start my PC (only the first time) then it works throughout the day

    It only freezes once and for some strange reason windows crashes when I click on Administrative Tools.

    Additional information from the double wire:

    I have absolutely no problem, except that Vista freeze 5 min after the first start of the day, and then it works fine.

    I also run a memory test and it found nothing.

    It's a hardware problem, because the problem persists after reformatting. Thanks for making me reformat the computer, guys.

  • Tracing with Visual Studio 2008 works only the 1st time

    Hello

    I use Visual Studio 2008 and TestStand 4.1.1.

    I have a c# dll and I'll call a function of TestStand.

    In VS, I "join to deal with...". "and choose to attach it to TestStand. I start my sequence and VS to get to the point break that I set myself in VS.

    Everything is great.

    Now if I "Stop debugging", I do some changes for my dll, recompile all right and reattach to TS, everything seems ok.

    But if I start my sequence, do not strike my breakpoints and step runs without me trace in my c# code.

    The only workaround is to close TestStand, restart it, reopen the sequence and reinstall VS on it, then works again my breakpoint.

    What's wrong? I wouldn't restart TestStand whenever I do change the dll and reattach. I tried to unload all modules also with no success.

    I do something wrong or solutions to avoid restarting TestStand after changes to the c# code and you want to draw it.

    Thank you.

    Hi Matt,

    First of all, I tried to replicate what you experience following your instructions, but I couldn't recompile the DLL after the stop debugging in Visual Studio, because the DLL was still in use in TestStand.  After I unloaded all the modules, I could recompile.  I then re-attached and saw what you were doing.  So, to get around him, I tied to the process in a slightly different way.  In Visual Studio, I went to tools' attach to process, and then chose the seqedit.exe process.  Before mounting, I pressed the Select button on the right side of the dialog box in the middle of changing the type of code we are debugging.  Select the radio button "Debug these code types" and verify that "Managed".  This will ensure that the debugger attaches only to managed code (c#).  After I did, I could run my sequence again without having to restart TestStand.

    I would like to know if it works for you.

  • Run only the first page load time

    All,
    Ive wrote a small plsql code under dynamic action (checked run when loading, but the button is hidden) I want to run only the first time my loading of the page, its correct operation, but I realized that it also runs every time this page is refreshed/submitted. How can I change this approach to run only the first time that this page is in charge and not at any other time refreshed/submitted?... Thanks & greetings

    In your dynamic Action where you specify PL/SQL code, there is an input field for Page elements to submit. View this element hidden there, and it should keep the value.

  • Script not running corrextly for the first time

    Hello

    I have a strange problem.

    Always wenn first time (after the opening of tiara), I run my script, it doesn't work for the masses. Creating a report specifically does not.

    When I run the script for the second time (and each additional hour) everything works fine and correctly?

    To understand:

    -I'm doing some (mathemtical) analyze - still works correctly

    -Load / Append ReportLayout prepared, add curves, create text objects - does not work for the first time, then it alwas works correctly

    The error is, that all the curves (that should be in several Annex layouts and text objects) are added to the first sheet of report responsible (although the reportsheets have been added)

    As I said, when I run the script second time (and each additional hour) everything works as it should?

    Thank you

    Hello

    I think I solved the problem by myself.

    I inserted "Call PicUpdate" between the two as an interim step, and now it works fine (even running the script first time)

    Thank you all

  • CS6 flash does not start after the first time.

    Hello! I installed Flash CS6 creative cloud in a previous version to open some old files. It works fine the first time you open it. After you close the it and try to open again, it shows the popup flash for a second and she disappears. Same thing over and over. After you uninstall and install again it opens for the first time and same problem after that.

    Any thoughts?

    It worked:

    Navigate to:

    C:\Users\«yourusername»\AppData\Local\Adobe\Flash CS6\en_US\Configuration

    There is a file fontinfo.txt. This opens up in Notepad and remove all what it and save it, but before you start again Flash, change the properties of this file fontinfo.txt for read only so Flash cannot crush him again.

  • Scan of a file only works on the first line

    Hello

    I'm new to Labview (see 8.6) and I'm running on this problem.

    I use the Scan of a file to get a certain amount of information for the installation of test.txt.  The data of the file looks like this:

    AAA 1

    BBB 2

    REC 3

    I noticed that the Scan of the file works for only the first line.  Trying to get data that are not in the first line results in an error 85.

    Any ideas? Thank you

    It's all in what the scan of the file reads, and what is the next cgaracter in the file.

    Your first analysis of the file reads up to but NOT including the first newline in the file.

    The second read readings where the first reading was arrested and is expected to see 'B' as the next character, but sees the new line instead, and if the analysis fails. You must specify second reading formatted to await the return line.

    You can do this by making the FIRST character of the format string space, that will tell it to expect a number any of charaters 'white space '.

    Yo can indeed put a space at the beginning of the format string in your first analysis of the file and it will match with zero white space characters before you see the AAA. By doing this he also tolerate to see the spaces and tabs before your AAA or BBB identifiers.

    Rod.

  • I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?

    I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?

    I have a hard drive. At least two partitions. C: 74.7 GB with 63.3 freespace
    D: 74.2 GB with 70.6 freespace
    These are my original specifications of the hard drive: 160 GB (7200 RPM) SERIAL ATA HARD DRIVE WI
    So I suspect there are at least one or more partitions hidden leaving 11.1 GB for hidden partitions!
    Windows is present on both drives C: & D:. In the directory windows on C:, the oldest entry is 19.12.12, 21.43 last 21.12.12, 22.50
    The first entry in the directory windows on D: is 19.12.12, 18.42 the last 21.12.12, 22.40
    I hope that makes sense to someone, any help gratefully received!

    As long as you have verified you dΘmarrez done on the c: / partition, Yes, you can reformat the drive D: / partition using Windows 'disk management '.

    J W Stuart: http://www.pagestart.com

  • My AS3 buttons only work the first time

    I set up my buttons so that are each a movieclip with 'plus' and 'out' States/frame labels. They exist in the main timeline. Their control actionscript code is located in a frame on the main timeline and the holding frame that actionscript is about even in the main scenario where the buttons are introduced. I use actionscript 3.

    The buttons have been implemented so that they navigate to another image in the main scenario and on this frame are a film. The dimensions of the movie are smaller than the main stage so that the buttons are still accessible when each video is played.

    The problem is that my buttons work only once - by that I mean they go to the correct place when you click on the first time, but when they are clicked they still sail elsewhere.

    Totally doing my head in trying to find a solution and if someone can help and show me what I'm doing wrong, what would be really useful. Here is the code I used for the buttons...

    Stop();


    function mainBtnOver(event:MouseEvent):void {}
    event.target.gotoAndPlay ("over");
    }
    /////////
    function mainBtnOut(event:MouseEvent):void {}
    event.target.gotoAndPlay ("out");
    }

    CLICK INDIVIDUAL BUTTON FUNCTIONS
    function mainBtn1Down(event:MouseEvent):void {}
    gotoAndPlay ("01Movie");
    }
    function mainBtn2Down(event:MouseEvent):void {}
    gotoAndPlay ("02Movie");
    }
    function mainBtn3Down(event:MouseEvent):void {}
    gotoAndPlay ("03Movie");
    }
    function mainBtn4Down(event:MouseEvent):void {}
    gotoAndPlay ("04Movie");
    }
    function mainBtn5Down(event:MouseEvent):void {}
    gotoAndPlay ("05Movie");
    }


    Button 1 listeners
    mainBtn1.addEventListener (MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn1.addEventListener (MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn1.addEventListener (MouseEvent.CLICK, mainBtn1Down);
    2 button headphones
    mainBtn2.addEventListener (MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn2.addEventListener (MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn2.addEventListener (MouseEvent.CLICK, mainBtn2Down);
    Button 3 listeners
    mainBtn3.addEventListener (MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn3.addEventListener (MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn3.addEventListener (MouseEvent.CLICK, mainBtn3Down);
    Button 4 listeners
    mainBtn4.addEventListener (MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn4.addEventListener (MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn4.addEventListener (MouseEvent.CLICK, mainBtn4Down);
    Key 5 listeners
    mainBtn5.addEventListener (MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn5.addEventListener (MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn5.addEventListener (MouseEvent.CLICK, mainBtn5Down);

    I'm sure it's doing me something very stupid - I am very new to AS3. Any help much appreciated.

    Thank you :-)

    If the image labels, you have video clips that have the content of your presentation, you must use gotoAndStop ("frameLabel") instead of gotoAndPlay ("frameLabel"). There is no need to play the main scenario, when you go to and present one of these clips. I don't know if that's your problem, but... Using your code, I had no problem.

    In addition, you can configure your animated buttons in a way that eliminates the need to have your ROLL_OVER and ROLL_OUT event. It is not necessarily better, but just another method. Although I could use other ways to animate a button, I don't want to reduce the code to use the buttons in an interface and use only the CLICK in the majority of cases.

  • HP ENVY 17 Notebook: HP support Assistant constantly reported as 'Stopped working' in the reliability report

    System recovered 5 days ago and reinstalled personal software. (HP 17 t-k000 CTO/Win 64 bit 8.1Pro)

    Almost immediately HP Support Assistant would communicate with HP Server. The program has been downloaded and reinstalled more than a dozen times during the 5 days... .rebooting every time between installs / deletion. Download from different places in the website of HP... but always version 7.7.34.34A. HP cat could not help... like that, the program worked for a few minutes, even though I showed the tech "reliability report". (it's a play on words!)

    After recovery was over and I used S.A. to update the operating system. The first time I used the program offered to me by 14 updates (so I guess that the program was "not" long before I got the operating system)... the program has shown the updates have been downloaded, but each time the update failed to install (X) next to the icon of installation. Restart the program again and selecting 'Check the HP updates now'... after displaying little pictorial showing ets connection/download... Returns a message... "No updates available". AND a new error is reported to the report reliability with the date and time. Now, in the last day or so IE11 has stopped responding... see below... Even typing this proved difficult because the page no longer!

    Today, the Web page for this laptop shows there are 2 BIOS update F34A (May 22, 2015) and F.09 Rev.A (16 April 2015), but as there is no update available via S.A. I haven't installed these either... my latest information installed BIOS is F.34, 19/12/2014!

    Battery/power cycling has solved nothing... "sfc/scannow" shows no error in operating system,.

    All suggestions accepted

    Thank you

    @Stu2009

    Thank you for all the useful information. However, there is something that you're not quite right about. It is true that normally the default account created on a system, is normally an administrator account. However as a safety device which is part of the User Account Control (UAC), he essentially keeps running as a common user, then on an administrator account.

    You can turn off UAC (I would not recommend that), or you can find the executable file of your programs, right click and compatibility mean that it runs as an administrator by default.

    Most of the time that you actually benefit from privileges program not raise unnecessary, however. Only a handful of things really really need to access that provides the "Run as Administrator".

    With regards to the BIOS, I would recommend that you try only a BIOS update if you are running in regular broadcasts normally. A wrong BIOS update can become a "brick" that requires a replacement of the Board of Directors, so for me it's one of those things you do only as a last resort, or if it's part of a fix recommended a functional system.

    As these updates from CyberLink you can always try to install it manually if you need, since the support page for your system. And let me know if they still appear in HPSA, after a manual installation.

    HP ENVY 17 t-k000 CTO Notebook PC (ENERGY STAR)

  • Why when converting a TIFF file to PDF, only the first page is the conversion?

    Why, when you convert a tiff to pdf file, only the first page is the conversion?  Never had this problem before.

    Hi steves18035157,

    Problem has been reported as a bug. Our team of engineers working in priority to get this fixed number.

    Kind regards
    Nicos

Maybe you are looking for