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

Similar Messages

  • 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
    >

  • 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

  • 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)

  • 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>

  • Capture PDF Events in Web Page

    Hi Team,
    I am not sure whether this is the right forum for my requirement. Provide me the correct location incase this is not the one.
    I have the following requirements
    To embed a pdf document in a web page (build using asp.net)
    Capture the page navigation events. This is to ensure the user visits the last page of the pdf document.
    First requirement can be easily solved by using a iframe. But that will leave me having no control over the pdf document.
    Hence I am looking for any control which takes the file path and displays the pdf document and the control also raises the events(next button clicked, previous button clicked, etc).
    Any help in this regard will be grateful.
    regards,
    Chandra.

    Thanks Leonard for your useful inputs.
    One more request.
    If I embed the PDF (containing acrobat javascripts) in a webpage, then can the javascript in the PDF communicate with the Web Pages javascript running in the browser. Something like pdf javascript function invoking the page's javascript function(to notify an event like Nth page loaded).

  • Submit processing with javascript "onUnload" event

    Hi there,
    I want a page to save its state regardless of how the user exits the page. Using page tabs, which have direct URLs, it seems the only way to do this is to use a javascript "onUnload" event which calls doSubmit(). The problem with this is that the submission requires a branch. Obviously, I don't want to branch the page; a destination has already been set. Telling the branch the is impossible as there is no way to access the destination URL for an onUnload event (understandably; it would be a serious breach of privacy.)
    So, the question I have is: is there any way to get a call to doSubmit() (or similar) to process the page, but not branch afterwards?
    Many thanks,
    Robert

    Robert,
    Take a look at the following thread -
    Re: clean page items when user leaves a page
    Whilst that thread deals with clearing items when the user leaves a page, it illustrates the issues of trying to capture the event of the user 'leaving' the page (after all 'leaving the page' could mean that they navigate to Google instead).
    An alternative way would not to try and capture the 'leaving event' but to store the values in session state automatically (perhaps using some of Carl's Ajax examples) when the user types them in, then have an application process that runs on every page that determines whether those values need to be written to the database or not.
    As an aside...I've heard of this requirement coming up quite a few times and I always question the logic behind it....since for every method that you can come up with as a way of forcing my input to be saved, I can come up with a way that will prevent it from working....until eventually we just reach the stage where I stand up and switch the machine off ;)

  • 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
    >>
    >
    >

  • Get Javascript Value in a JSP page

    Let's say this is my javascript function in a html page
    .<head>
    <!-- Function getFields -->
    function getFields(){
    if (row >= 0){
    for(var i=0; i<costForm.elements.length; i++){
    if(costForm.elements.type == "text" || costForm.elements[i].type == "hidden"){
    dynTableFields[i] = (costForm.elements[i].value)? costForm.elements[i].value : "";
    if(costForm.elements[i].type == "select-one"){
    dynTableFields[i] = costForm.elements[i].selectedIndex;
    </head>
    How do i get the costForm.elements.length value in another jsp page. Coz the html page has dynamic rows by the users. and i need the values in the jsp page to know how many rows the user created.
    using normal request.getParameter("costForm.elements.length") doesn't work

    request.getParameter() will only get data that's been submitted thru a form or the query string of a URL. You'd have to record the length in a hidden field to read it on the back end, and then you can't just loop thru the fields like that in JSP on the server anyway, unless you have all fields named with a prefix and number, like: field1, field2, field3, etc.

  • Calling a javascript on load of jsff page

    I have a jsff page which is loaded as a taskflow from region.
    i tried to call an alert function on load of jsff page as follows:
    <af:clientListener type="load" method="jsMethod"/>
         <af:resource type="javascript">
         function jsMethod() {
            alert("Hi Page loaded");
    </af:resource>
    If it works fine i intent to call backing bean method from javascript later.
    the alert is not being called in this case.
    what's wrong with this method?

    Duplicate of https://community.oracle.com/thread/2617922
    Please don't ask your question multiple times!
    Timo

  • Best way to include javascript-script into different struts-pages

    Hi,
    I'm running a struts-based webapplication using the tiles-templates for my layout. Now I have to use some javascript-code for a pop-up window and another javascript for tracing on multiple pages but in different combinations. As I do n't want to copy-paste it on every page, but put it on a single place for better maintenance I'm wondering what would be the best way to do this together with the struts-logic.
    I thought about the following options:
    1.) Using the "template:put" feature like this:
    <template:put name='js' content="/myJavascripts.jsp"> I don't think this would be a good option, as I always have to include the whole javascript and I cannot distinguish between my two different javascripts
    2.) Using the template:insert feature like this:
    <template:insert template="/myJavascripts.jsp"/>. This is a lot better, as I can split my two javascripts into two different files and can always decide, which one to include with the template:insert tag. But I'm not sure, if this is conforming with the struts-concept, as I do not use any template:put or template:set tags
    3.) Using simple jsp:include or <%@ include ... %> tags.
    This would be the easiest way to include my pages with <%@ include file='/myJavascripts.jsp' %>. Same advantages like template:insert but I don't need the additionally features of the template:insert-tag. But still the same question: is this the concept of struts? Or will I become any difficulties with this concept later??
    Any recommendations or further ideas are greatly appriciated.
    Thanx for your help
    Thomas

    Getting PDFs to download is fairly easy and the method is described here.....
    http://www.iwebformusicians.com/WebMusic/PDFs.html
    To get multi page docs to display in the browser requires the use of Google Docs viewer, ISSUU or some such thing....
    http://www.iwebformusicians.com/PromoPage/ISSUU.html
    Safari is the only browser I know of that will display PDFs in an iFrame without a plugin.

  • Help using app_standard.event(when-tab-page-changed')

    Hello ,
    I need to create a form with the following requirements . There is one content canvas which contains a tabbed canvas and on this there are two stacked canvases .
    The problem is that when I compile my form and ftp to oebs , I cannot view the tab pages on the canvas .
    I see only my the fields displayed in the first tab page without the 'tab pages'.
    How do I solve this issue please ?
    My when-page-page-trigger contains the following :
    BEGIN
         APP_STANDARD.EVENT('WHEN-TAB-PAGE-CHANGED');
    if name_in('system.cursor_block') = 'XX_ERROR_MANAGEMENT' then
    if not form_success then
    -- Revert tab to prior value and exit
    set_canvas_property('CAN_INT',topmost_tab_page,name_in('system.tab_previous_page'));
    return;
    end if;
    -- Move to first item on each tab
    if target_canvas_name = 'CAN_INT' then
         SHOW_VIEW('CAN_ONG1');
    go_item('XX_ERROR_MANAGEMENT.INTERFACE_TYPE');
    else
    show_view(target_canvas_name);
    end if;
    END IF;
    END;
    Any help will be much appreciated . Thanks .

    bump

  • Javascript to create bookmark for page that does not exist yet

    Hello all,
    Is there a way to write js for a bookmark that goes to a page that does not currently exist?
    For example, I have a 20 page pdf document.  We have FileMaker Pro that can 'append' to a PDF additional pages.  So when FileMaker pro appends two new pages (bringing us up to 22 pages), I'd like to have 2 'existing' bookmarks in the original 20 page pdf document that will, when clicked, go to page 21 and 22 respectfully.
    Is this possible and would anyone have the JS I would put into that bookmark?
    Thank you in advance!!

    Here's what I posted in the other forum you posted this to, in case it might help someone here:
    The JavaScript would be:
    // Go to page 21
    pageNum = 20;
    If there are fewer than 21 pages, it will go to the last page. If you want to avoid this, you could do something like:
    // Go to page 21 if there are at least 21 pages
    if (numPages > 20) pageNum = 20;

  • Using javascript in modified Aperture web page themes

    Thanks to the many well-written tutorials on the subject, I've been able to modify an existing Aperture web theme to export customized web pages that have the exact look I'm after. I've successfully copied the Stock theme, edited the detail and journal-gallery html along with the global.css files and merged with a professional template I purchased, so now my Aperture-generated galleries look just like the rest of the pages on my web site.
    Of course, there's always a problem:
    If I reference any Javascript from the Aperture template files, Aperture EXECUTES the script during the process of exporting the web pages, and includes the result of the Javascript execution in the rendered HTML. It does this IN ADDITION to correctly writing the Javascript reference to the rendered page. The end result is TWO of everything. An example will make this more clear:
    If I include the following line in journal-gallery.html:
    <script language="JavaScript" type="text/javascript" src="assets/scripts/sidebar.js"></script>
    and the file sidebar.js contains:
    document.write('Home
    document.write('<'t find a single reference to the use of scripts. CLEARLY APERTURE KNOWS ABOUT JAVASCRIPT AND EXPECTS TO FIND IT BECAUSE IT'S EXECUTING ANY SCRIPT IT COMES ACROSS!!!
    The goal of all this, of course, is what any large professionally-done web site strives for: I don't want to re-render all my static content (the photo galleries) every time I add or remove a link in the sidebar. Editing sidebar.js should be all that's required to change the links.
    Anyone?

    Sorry, I see that the Javascript snippets in my original post are being executing by the web browser when the message is read.
    The 2 lines of Javascript, cleverly (ahem) encoded, might be visualized:
    document (dot) write ( <html anchor tag>Home<close html anchor tag>);
    document (dot) write ( <html anchor tag>Site Map<close html anchor tag>);

Maybe you are looking for

  • I am unable to load games after sync?!

    hi I was trying to update to IOS 5 but the operation didn't start after doign the sync oiperation i disconneted my Iphone from itunes - now i am unable to load any game thank you

  • How to set up family sharing for 8 people in my family

    My wife and I are both remarried so between us we have 6 children ranging in age from 16 to 8.  We all have iphones/ipods or ipads.  I had set us up with the same itunes and icloud so we could share purchases and more importantly easily use Find My i

  • Illustrator cs4 preferences file corrupt message

    I use Illustrator cs4 for windows and after I restart my computer when I open Illustrator cs4 a box pops open telling me that the preferences file is corrupt and it is using the default settings. This only happens when I restart my computer. If I don

  • Am I an idiot or what......

    I know this is a dumb question but.... I'm having trouble getting into my itunes account on the ipad. How do I access my itunes account? I'm signed in to my account but I cant get to the actual page (library). On my pc the icon sends me directly to t

  • Adobe Flash Player has Disappeared from my FF Add-ons & won't reinstall

    Adobe Flash Player has Disappeared from my FF (version 4.0.1) Add-ons & won't reinstall. The Adobe Test page says that I've successfully installed the latest version (10.3.181.34) of Flash Player but after trying this 4 times, Flash just refuses to s