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

Similar Messages

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

  • Body onload ()  for a JSP from portal

              Hi All,
              I am using weblogic workshop 8.1 and developing some jsps with rich netui custom
              tags. I have many portlets(contains JSPS) loaded in portal file. I want to call
              body onload() event from some JSP's. But, when load a portal file, the JSP's onload
              event is not getting fired.
              Can anybody help me in solving this problem?
              Thanks in advance.
              regards,
              Prashant
              

    Hi ,
              I think, It will be helpfull to you.
              <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
              <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
              <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
              <body class='gs-IframeContainer-Body' onload="psButtonSrcInit('<bean:write name='commentsAttachmentsForm' property='buttonName' filter='true' scope='request' />', '<bean:write name='commentsAttachmentsForm' property='currentColumn' filter='true' scope='request' />'), parent.lsResizePage('<bean:write name='commentsAttachmentsForm' property='currentTarget' filter='true' scope='request'/>'), gsBusyStateCheckStateChange()" scroll='no'>
              Go through the link as I given below,In that you will find more information on this.
              http://javaboutique.internet.com/tutorials/InitForms/javascript.html
              ----Anilkumar kari

  • 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

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

  • Handling mouse events in JSP

    Hi ,
    I have to handle mouse events in JSP,means i have to handle the event
    of the user i.e, if he press the lest click we have to handle that
    event where he pressed it with JSP. Iam finding examples in Applets ,
    nut i have to do it in JSP.Can any body help me please? it's very
    urgent.
    Thanks in advance
    BhargavKumar.B

    JSP cannot catch mouse events. You need a clientside language for that, such as Javascript. So catch the mouse click event in Javascript, get the desired information from it and send it as request parameters to the server, so that the serverside logic can intercept on it. You can use AJAX for that, if you want to do it asynchronously.

  • Events in jsp

    hi all,
    I'm new to JSP. Please help me to solve the below problem
    i have one combo box and 2 textfields in my project..if i select some value in the first combo box ,that value pass into the JSP database coding and then related value of first combo box is populate in to the 2 textfields from SQL server (data base) in JSP......
    should i use itemstatechanged event like java
    if yes how
    Plz help me ............soon.........
    thanks in advance

    You can use AJAX for doing this. Or you can submit the page onchange event of the combo and get the required values from the DB and set the values in the text field.
    Please check the onchange attribute of the select tag.

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

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

  • Can we use control events in smartforms

    Hi all,
    I am srinivas. can we use control events in smartforms, I mean at new, at end of ..... if these are not used can you suggest me any alternative....
    Actually my requirement is like a classical report, for which I need to display subtotal and grand totals based on two fields....
    Please help me out in this issue as it is very urgent.
    <b><REMOVED BY MODERATOR></b>
    Thanks in advance....
    Regards,
    Sri...
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Nick,
            Thanks for the reply... it is really very useful for me.
    As I discussed in my earlier mail regarding the output sequence, which should be in the below format.
                                           number       quantity uom      unitprice        amount curr
    plant
           material
                   date
                                             x                 y                    z                      A           
                                             e                 f                     g                      h
                                             p                 q                     r                      s
                   subtotal date..... 1                   2                    3                       4
                   subtotal  material.5                  6                    7                       8
    As you said when I using <b>event of Begin</b> its working fine. but while using the <b>event of end</b>,  I am specifying date and then matnr (sort) its taking(nodes are created mean first matnr and then date) in the reverse order and when I am taking matnr and date it is placing the events(nodes) in the right order but the order date is not triggering.
    can please tell me how to proceed here..
    waiting for your reply..
    Regards,
    Srinivas

  • Can we use Initilization event in module pool program?

    Hi All,
    Can we use Initialization event in module pool program? If not why?
    Thanks In Advance!!!!!!!!!

    The runtime environment creates the INITIALIZATION event and calls the corresponding event block (if it has been defined in the ABAP program).
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    SEE THE ABOVE LINK...THINK IT WILL SOLVE ALL YOUR DOUBTS
    REGARDS
    RACHEL

  • How do I use the event.target.name String with an external dispatchEvent?

    ...I hope the title question makes sense...
    On my stage I have an externally loaded SWF with a button. When clicked the button dispatches an event to the main stage.
    On the main stage a listener then loads an SWF into a loader called gallery.
    The gallery loader is also being shared by buttons on the main stage which use the event.target.name String to call in SWFs with corresponding names.
    I am using Tweens to fade-out and -in content to the gallery when a button is pressed.
    Loading the SWFs was working until I tried to create a universal button function for the dispatchEvent buttons...
    The problem I have is that I don't know how to define the String to tell the newSWFRequest where to find the SWF when triggered by the external buttons.
    (I may be doing this all wrong... but figured the best way to load an SWF on to the main stage from an external SWF was by using dispatchEvent??)
    My code triggers the Event and the gallery loader fades out, but then it cannot find the new SWF:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Please can someone help me understand the way to make the String point in the right direction? (I think the only errors are in bold below)
    Code:
    var myTweenIn2:Tween;
    var myTweenOut2:Tween;
    var nextLoadS2:String;
    // Listen for external event dispatched from external btns
    addEventListener("contactStage", btnClickExtrnl);
    function btnClickExtrnl(e:Event):void {
    nextLoadS2 = ?????
    myTweenOut2=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOut2.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    // Btns Universal function
    function tweenOutCompleteF2(e:TweenEvent){
    myTweenOut2.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    myTweenOut2=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/" + nextLoadS2 + ".swf");
    myTweenIn2 = new Tween(gallery, "alpha", None.easeOut, gallery.alpha, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    Thank you.

    That works – thank you!
    I'm now using this code to fade in each of the SWFs:
    function contactStage(e:MouseEvent):void {
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
        myTweenIn = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But I cannot add the fade out function. I have amended the above code to create:
    var myTweenOutX:Tween;
    var myTweenInX:Tween;
    function contactStage(e:MouseEvent):void {
    myTweenOutX=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOutX.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    function tweenOutCompleteFX(e:TweenEvent){
    myTweenOutX.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    myTweenOutX=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
    myTweenInX = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But get this error:
    ReferenceError: Error #1069: Property name not found on fl.transitions.Tween and there is no default value.
    at ACOUSTIC_fla::MainTimeline/tweenOutCompleteFX()[ACOUSTIC_fla.MainTimeline::frame1:110]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at fl.transitions::Tween/set time()
    at fl.transitions::Tween/nextFrame()
    at fl.transitions::Tween/onEnterFrame()
    Where am I going wrong?

  • How to schedule a background job using the Event concept..?

    Hi Folks,
    I have a requirement that, I need a schedule a background job.
    Once after the previous job successful only, new job should get triggered. How to go ahead with this..?
    For Eg, I am scheduling a job called ZTEST periodically for 1 minute. If the job is not get completing with in 1 minute, I dont want to start my new job. Only after the success of my old job, I want my new job to run.
    Waiting for ur replies.
    Regards,
    Savi.

    Hi,
    You can use events that have already been defined, or you can create new events for scheduling background jobs.
    If you wish to use new events, do the following to implement the event scheduling:
    Define and transport the event as a user event with transaction SM62.
    You must define only event IDs; event arguments are not defined in the R/3 System. Instead, you specify event arguments when you schedule a job to wait for an event and when you trigger the event.
    If you define a new event, you must also transport it to your production systems. The event transaction does not have a connection to the transport system. Instead, you must create a transport request for the event yourself.
    Do this to transport an event:
    Create a transport request.
    Start the editor in the transport request and enter the following:
    R3TR TABU <table name> where table name is BTCSEV for a system event ID, BTCUEV for a user event ID.
    Press F2 with the cursor on the table name to call up the screen for specifying the table entries to transport. In this screen, enter the event ID’s that you have created.
    Save and release the transport request. Ensure that it is imported into your production system(s).
    To trigger an event, add:
    – the function module BP_EVENT_RAISE to your ABAP program, or
    – the program SAPEVT to your external script, batch file, or program.
    When your programs execute these keywords, an event will be triggered in the R/3 background processing system. The event-based scheduler is started immediately. It in turn starts all jobs that were waiting upon the event, subject to normal background processing restrictions, such as the requirement that the job has been released to start.
    Schedule the jobs that are to run when your events are triggered.
    You can schedule jobs for one-time start or to be started whenever an event is triggered.
    Regards,
    Raj.

Maybe you are looking for