ImportData by "onload" event

I am using javascript to dynamically load XML into a form using: xfa.host.importData("test.xml");
This works fine using a button after the page has loaded, but when I put this code in an Initialize event it does not work. I have also tried call the button click event from the initialize and this does not work as well. I have inserted messageboxes around the call for importData and they are called, yet it doesn't seem to be importing this data. No error messages are thrown. Is this functionality disabled?
Other Info:
-have tried the same testing on initialize with form:ready, layout:ready, docRead and others as well as on different levels of the subforms
-Using adobe professional 7.0 professional with designer 7.0
Thanks.

You should not do this kind of import when the form is loading even on form:ready, etc. The problem is that importData will reset the form and all the events so that the data can be loaded & form re-generated. This means that once the data is loaded, ALL the form init events fire again (inc. form:ready, etc.)
If you do put importData into one of these events, you would get recursion, where it continually tries to load data. To stop this from happening, they have blocked this call, so in the end you get an error saying something like general operation error. BTW, The error is probably in the console - where all javascript errors will be sent to. FormCalc is the only one which reports errors back to the user via Dialogs
Your options really are restricted to one of the following
- Let the form complete and have a user interaction to load the data. You could lock the form down (i.e. disable everything) and have the user unlock & unload via a button for example.
- Have a server option to either use XDP (with data to prepopulate the form) or have a server product do it for you
- Use a webservice to load/save data (again would require a server infrastructure)

Similar Messages

  • Onload event after all images are loaded in an updateContent area

    Hi Spry Folks!
    I load a template into a page with a lot of img tags inside
    it. Everything works fine.
    Spry.Utils.updateContent (...HTML wit lots of img tags...)
    But the loading takes a while so I would like to hide it
    until all the images are loaded. Now I need an event which fires
    after the loading bar in the browser is gone.
    The onPostLoad observer fires much to early, cause the code
    is long loaded bevore all the images
    (...addObserver({onPostLoad:...)
    Same with the window.onload event (...window.onload =
    showContent();...) fires much to early.
    The only thing which is working is placeing the function in
    the onload event of the body tag.
    Like:
    <body onload="showContent();">
    But there I can't use it. And there is now body.onload
    handler as far as I know there is only the windows.onload handler
    and I thought always this is the same event than onload in the body
    tag.
    Has anyone an idea? Is there a spry event I haven't found for
    exact this problem?
    Thanks for your help!
    regrads
    marcus

    Hello,
    U might want to look in to the SpryImageLoader.js that comes
    with the 1.6.1 download. It loads your images, and allows u put
    callbacks on them, and set priority of loading them.
    http://www.dbooth.net/photos/
    uses it to (expect don forgot to upload the
    SpryImageLoader.js thats why its not really working :P )
    But that will give the basic idea of how to use it.
    Spry.Utils.ImageLoader.(url, callback(needs to be a function
    or null), priority)

  • Using onLoad event in jsp?

    Hi,
    i have created a link in my controller class dynamically and i want this link to load into my iView without clicking on Link control.
    That is , when the user clicks on the page having my iView he should see the contents of the link. For eg . an HTML report.
    How shall i accomplish this?
    i used onLoad event in the <body> but it  is not working.
    Thanks
    Saurabh

    Hi Saurabh,
    Try this:
    <head>
    <script language="javascript">
    function openwin(){
       var newWin = window.open("the real url", ....); // params and stuff
    window.onLoad = openwin();
    </script>
    </head>
    <body onLoad="openwin()">
    </body>
    </html>
    Regards,
    Pooja.
    Message was edited by: Pooja S

  • Can i use onload event in XSLT

    Hi all,
    I am working on xml and xslt.
    After the xslt tranfermation i wants to call a function defined in javascript.
    I just wants to use onload event but its i dont have idea how to call an onload event.
    thnx,
    raj

    Not sure what you mean by a CDATA section. But here is the XSLT file showing the template for the root element. The script is included using a <script> element, inserted in the <head> element. Should it be some place else?
    <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="Trial procedure.xml" -->
    <!DOCTYPE xsl:stylesheet  [
        <!ENTITY nbsp   "&#160;">
        <!ENTITY copy   "&#169;">
        <!ENTITY reg    "&#174;">
        <!ENTITY trade  "&#8482;">
        <!ENTITY mdash  "&#8212;">
        <!ENTITY ldquo  "&#8220;">
        <!ENTITY rdquo  "&#8221;">
        <!ENTITY pound  "&#163;">
        <!ENTITY yen    "&#165;">
        <!ENTITY euro   "&#8364;">
    ]>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
    <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title><xsl:value-of select="MovexUser/Title"/></title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="resources/navigatorSpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body id="body">
    --- The JavaScript funtions are called inside DIV elements here. ---
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

  • OnLoad event on Body tag locked by template

    I have a behavior that needs to be called with an OnLoad event. The page I need it on is attached to a template, so the Body tag is not available for editing. What are my options? Thanks!

    If you are using DW>4 (that's DW4, not DWCS4), then investigate using Template Editable Attributes.
    Alternatively you could use some custom javascript in the editable region of the head of the page or even below the </html> tag to create an onload event, e.g.,
    <script type="text/javascript">window.onload=whatever();</script>

  • Javascript: don't get onload event

    I'm still having issues grabbing properties via javascript
    using various
    onload methods. I have a script that I'm using to toggle a
    checkbox based on
    whether another checkbox is checked or not:
    function toggleEnabledCheckBoxes(idOfToggler, idOfToggled) {
    if(document.getElementById){
    alert(document.getElementById(idOfToggler).checked);
    if(document.getElementById(idOfToggler).checked==true){
    document.getElementById(idOfToggled).disabled=false;
    else{
    document.getElementById(idOfToggled).checked=false;
    document.getElementById(idOfToggled).disabled=true;
    This works just fine if I call the function via a BODY onLoad
    event:
    <body
    onload="addLoadEvent(toggleEnabledCheckBoxes('cbx_selfHelp','cbx_legalCourtnetOnly'));">
    However, I'm trying to get out of the habit of using the
    onload event and
    instead want to use this addLoadEvent function:
    function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
    window.onload = func;
    } else {
    window.onload = function() {
    if (oldonload) {
    oldonload();
    func();
    addLoadEvent(toggleEnabledCheckBoxes('cbx_selfHelp','cbx_legalCourtnetOnly'));----------- ----------------------If
    I use that, the function still is called, but I get an error
    of:Error: document.getElementById(idOfToggler) has no propertiesI'm
    confused as to why this is.-Darrel

    darrel wrote:
    > I'm still having issues grabbing properties via
    javascript using various
    > onload methods. I have a script that I'm using to toggle
    a checkbox based on
    > whether another checkbox is checked or not:
    >
    > ---------------------------------
    >
    > function toggleEnabledCheckBoxes(idOfToggler,
    idOfToggled) {
    >
    > if(document.getElementById){
    > alert(document.getElementById(idOfToggler).checked);
    > if(document.getElementById(idOfToggler).checked==true){
    > document.getElementById(idOfToggled).disabled=false;
    > }
    > else{
    > document.getElementById(idOfToggled).checked=false;
    > document.getElementById(idOfToggled).disabled=true;
    > }
    > }
    > }
    >
    > ---------------------------------
    >
    > This works just fine if I call the function via a BODY
    onLoad event:
    >
    > <body
    >
    onload="addLoadEvent(toggleEnabledCheckBoxes('cbx_selfHelp','cbx_legalCourtnetOnly'));">
    >
    > However, I'm trying to get out of the habit of using the
    onload event and
    > instead want to use this addLoadEvent function:
    >
    >
    > ---------------------------------
    >
    > function addLoadEvent(func) {
    > var oldonload = window.onload;
    > if (typeof window.onload != 'function') {
    > window.onload = func;
    > } else {
    > window.onload = function() {
    > if (oldonload) {
    > oldonload();
    > }
    > func();
    > }
    > }
    > }
    onload=function(){
    toggleEnabledCheckBoxes('cbx_selfHelp','cbx_legalCourtnetOnly');
    But this will work only if you don't use the <body
    onload="stuff">. Your
    addLoadEvent function should work, perhaps it's the arguments
    it doesn't
    like.
    Mick
    >
    >
    addLoadEvent(toggleEnabledCheckBoxes('cbx_selfHelp','cbx_legalCourtnetOnly'));----------- ----------------------If
    I use that, the function still is called, but I get an error
    of:Error: document.getElementById(idOfToggler) has no propertiesI'm
    confused as to why this is.-Darrel
    >

  • Simulating Javascript onload event in OA Page

    Hi,
    I want to invoke the controller of a page without displaying the Page itself!!!
    I have 3 OA Pages. 1)Main Page 2)Subpage1 3)Subpage2
    Initially the user will be in Oracle Configurator Module.
    I need to go to Subpage1 or Subpage2 from Configurator.
    The page to be navigated to is decided at runtime.
    So i m planning to invoke mainPage from Configurator. and on load of Main Page,
    its controller will receive page deciding parameters from Configurator.
    User Flow
    Configurator --(input = A)---> SubPage1.
    Configurator --(input = B)---> SubPage2.
    Technical Flow
    Configurator --(input = A)---> Main Page ----(if A)--->SubPage1.
    Configurator --(input = B)---> Main Page ----(if B)--->SubPage2.
    Now My conern is I do NOT want to show Main Page to the user.The user should feel as if he is going to SubPage 1 directly from Configurator
    In a JSP,I would use javascript function which will catch the onload event on the JSP and I will check the input parameter and perform FORM SUBMIT.
    How can solve it in OAF?
    Thanks,
    Gowtam.

    Hi, Gowtam.
    You can receive values in processRequest at the Main Page and forward to subpages or (not recommended) use javascript:
    import oracle.apps.fnd.framework.webui.beans.OABodyBean;
    OABodyBean body = (OABodyBean) pageContext.getRootWebBean();
    body.setOnLoad("javascript: document.forms[0].action = 'xxxxx'; document.forms[0].submit();");
    Regards,
    Elner Ribeiro

  • Why I can't set the Detail Section of a form at onLoad event?

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro
    You should be able to size the detail section of the Form in the open event or onload event.
    I don't have 2010 on my PC. Why not post the sample code here?

  • Firefox 3.6.7 document.body is null in onload event.

    Starting with Firefox 3.6.7 I am sporadically getting document.body is null in my window.onload event handler. It's happening inside a widget iframe that is created dynamically. It's been fine in prior versions.
    == With Firefox 3.6.7 ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

    You can try to use a setTimeout()
    A good place to ask questions and advice about web development is at the MozillaZine Web Development/Standards Evangelism forum.
    The helpers at that forum are more knowledgeable about web development issues.
    You need to register at the MozillaZine forum site in order to post at that forum.
    See http://forums.mozillazine.org/viewforum.php?f=25
    You need to post a link to the website or post relevant parts of the code.

  • Multiple OnLoad Events Syntax

    What is the correct syntax for having multiple items attached
    to the <body
    onload=""> event? Do I separate items with a comma, a
    semicolon, or is
    there a different way?
    Brandon
    http://www.presentationsdirect.com

    Thanks, but that seems a little too difficult for what I
    need. The solution
    below ended up working for me.
    <body onload="action 1; action 2">
    (i.e. only one set of double quotes)
    Brandon
    "Shane H" <[email protected]> wrote in
    message
    news:euh5kj$2p3$[email protected]..
    > Hi,
    >
    > What I've been doing, and since it was taught to me by a
    well-versed
    > designer in Javascript, I put my functions into an
    external javascript
    > file, and place this at the end of the file-
    >
    > function addLoadEvent(func) {var oldonload =
    window.onload;if(typeof
    > window.onload != 'function'){window.onload =
    func;}else{window.onload =
    > function(){oldonload();func();}}}
    > addLoadEvent(function(){Function1();});
    > addLoadEvent(function(){Function2();});
    >
    > Where you see the addLoadEvent...Function1, etc. - all
    you need to do is
    > change the names of the Function1, Function2, etc. to
    your function names.
    > You can then add as many scripts as you need to load.
    >
    > HTH, take care,
    >
    > --
    > Shane H
    > [email protected]
    >
    http://www.avenuedesigners.com
    >
    > =============================================
    > Back for 2007, close-up magic:
    >
    http://deceptivemagic.com
    >
    > Web dev articles, photography, and more:
    >
    http://sourtea.com
    > =============================================
    > Proud GAWDS member
    >
    http://www.gawds.org/showmember.php?memberid=1495
    >
    > Delivering accessible websites to all ...
    > =============================================
    >
    >
    > "Brandon" <[email protected]>
    wrote in message
    > news:euh4v8$202$[email protected]..
    >> What is the correct syntax for having multiple items
    attached to the
    >> <body onload=""> event? Do I separate items
    with a comma, a semicolon,
    >> or is there a different way?
    >>
    >> --
    >> Brandon
    >>
    http://www.presentationsdirect.com
    >>
    >
    >

  • What is the conversion of onload event to AS3 ?

    I have following code on AS2 . Now I need to convert into AS3. Please give your idea to change into AS3
    myxml2.onLoad = function() {
         // functionality goes here
    myxml.load(my.xml);

    var xml:XML;
    var url:String = "sample.xml";
    var req:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader(req);
    loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
    function loaderCompleteHandler(event:Event):void {
        xml = new XML(event.currentTarget.data);
        trace(xml.toXMLString());
    Or one could always RTFM: Reading external XML documents
    http://livedocs.adobe.com/flash/9.0/main/00000132.html

  • Urgent: onload event in HTMLB

    Hi,
    I am not able to find out what is the name of the event when HTMLB form control gets loaded.
    I am doing some mathematical operations on form load event.
    i.e.In HTML we write <body onLoad "abc()">
    where abc() is a java script function.
    Could anyone please tell me how I can achieve the same in HTMLB?
    I am using HTMLB tagLibs
    The sample format of my code is as follows
    <%@ taglib uri="tagLib" prefix="hbj" %>
    class="src.api.CreateDDSBean" />
    <hbj:content id="createDDSContext" >
      <hbj:page title="createDDSPage">
        <script language="javascript">
         function abc()
        </script>
       <hbj:form id="formCreateDDS">
           //some jsp code with htmlb taglibs
       </hbj:form>
      </hbj:page>
    </hbj:content>
    From where I can get the information regarding various trigger events for various controls?
    Thanks
    Parag

    Hi,
    And to make it more easier to update you could do something like this:
    <script language="JavaScript">
    // alert box
    function abc(){
      alert('this is function abc');
    // set window status
    function xyz() {
      window.status = "this is xyz function";
    // functions for onload
    function myonload() {
      abc();
      xyz();
    window.onload=myonload;
    </script>
    Regards,
    Ville

  • ADF Faces Declarative Component onLoad event call Backing Bean Method

    Hello.
    We are trying to implement a declarative component, that will be used as Flex Fields for our application, ie, the components will be created dynamically through a database configuration, and who is responsible for organizing and creating the components, is the declarative components, and its own backing bean.
    The declarative component, will receive a List of custom components, and with this list it is possible to create the components dynamically. We want the components to be created as soon as the page is loaded. The developer could place this declarative component in any region of his page, and even in another tab if he wishes. The problem is, that we cannot register a load event in the declarative component, since it doesn't have a document Object, to call the declarative components backing bean method that is responsible for creating components.
    How could we simulate the onLoad (of the declarative components) so that the backing bean method (responsible for creating component, and putting it in the view tree) could be called ?
    I've tried with a RENDER_RESPONSE phaseListener, but the beforePhase has no objects in the tree, and the afterPhase has already rendered to the client.
    Any ideas on how to achieve this ?
    Thanks a lot.
    Regards,
    John

    Hi Frank, thanks for the response.
    I'm curious about the dynamic declarative component. Any place I could check it out ?
    Back to my scenario. I'll try to be more clear to what we need!
    We have to have dynamic creation of components, based on a database configuration. This will allow our customers to have custom flex fields, without the need of us developing custom pages for each customer.
    One solution we are trying out, is the declarative component. Why ? Because the developer (when developing the page), knows that this specific page, is possible of customization by the client (custom flex fields). With this, the developer would choose where on his page the custom flex fields will be placed. Note that at this point (design time), no component (input, buttrons, etc) is created. The idea of the declarative component, is just so the Developer knows where he wants the custom fields placed in his page (a tab, below the form fields, in a another panel group, and so on). The declarative component, has only a container, PanelFormLayout, and no other component.
    What we want, is a way of calling our managed bean (the managed bean of the declarative component, that now I did configure it in the adfc-config.xml file , thanks for the tip) method, that's responsible for creating the custom components. The declarative component, receives a list of all the custom fields that needs to be created, at design time, through an attribute. The developer is responsible for setting this list when he drags the declarative component on his page.
    Now that I've put the declarative components managed bean in the adfc-config.xml file, the @PostConstruct is called correctly, but I still have a problem. At this moment (postContstruct call), my component PanelFormLayout (that is binded to the managed bean), is null. So I cannot add any component to the PanelFormLayout.
    Am I way out of line here Frank ?
    Really appreciate your comments.
    Thanks a lot.
    John

  • Jpanel kind of onload event in HTML tag body

    I have a swing app, with many panels in tabbedpanes or in containers with cardlayout, etc...
    When a panel is active,shown,visible... , I want to catch this event
    and do something. How can this be done?
    Thanks in advance
    Gabi

    Add a Componentlistener to your frame..
    void componentShown(ComponentEvent e)
    Invoked when the component has been made visible.
    hth

  • OnLoad Event in as3????

    please change this code to as3 code.....
    mymc.onLoad=function()
       trace("onLoad is working!")

    please change it yourself
    http://www.adobe.com/devnet/actionscript/as3_migration_table.html

Maybe you are looking for

  • 15 inch vs 17 inch workspace

    Hello all, just wandering how much more space you get with the 17 inch. It is only less than 2 inches difference in actual siza but a huge difference in resolution... any pics or something like this?

  • CS5 Illustrator - error message

    Hello Does anyone know how to get rid of this error message? Every time I try to scale a bounding box this message appears... Bounding Box or Free Transform encountered an unknown error. Error: PARM Never happened to me in CS3. Do I have to update my

  • Safari-Is there any way to stop the tab bar from disappearing when you scroll down?

    It's really annoying.  I know tapping it makes it come back, but still.

  • New Release Movies

    I have been trying to figure out what is going on with On Demand New Release Movies. In December there were "Coming Soon" movies--Blue Jasmine, Gravity, Rush, The Butler, Captain Phillips.  Some had 'available for viewing' dates and some did not.  Th

  • Call a pkg of another data base via dblink

    call a package from another database by dblink oracle call a package from another database by dblink oracle , i got one pkg in DB A and i got dblink in DB 2 to DB A now i wnt to call the pkg og DB A from DB 2 Thanks Raj