Onunload event in javascript

I want the user to log off as soon as the browser is closed..
For it i m firing an onunload event in the body tag..
this thing is working fine in Windows XP but not in 2000
My code is
function closeWindow()
if(boolCloseWindow != "false")
document.frmChgPwd.requestid.value = "LGF000";
document.frmChgPwd.submit();
return false;
I m calling this function like this
<body onunload="return closeWindow()">
boolCloseWindow is a flag that i m setting to check some conditions
when i call this event a requestid is set and the form is submitted to a servlet where the servlet does the task of deleting the record from the database.
but its not working in Windows 2000
please help

Dear Professional,
Good Morning. Are you looking for CMM Level - 5 or onsite oppertunity. Here are the correct match for you. Just send your updated profile to this id: [email protected]
Also do let us know, if any of your friends intrested for this oppertunity.
Regards,
Swathi.

Similar Messages

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

  • Handling events in javascript which are generated by embedded applet

    I am having an tipical requirement , In my HTML page there is an embedded applet . This applet is going to generate custom events . I would like to handle that events in javascript which are generated from applet . I mean that javascript has to get a notification of the event that is generated from applet . I would appreciate if some one can send me the code .

    Hi look at my post further down about 5-6 posts. It's called: "For your information. Very interesting." It talks about Netscapes Live Wire.

  • Want to trigger an event in Javascript using Actionscript

    Hello forum,
    I am trying to trigger an event in Javascript from an SWF.  In HTML the triggering event is this:
    <a href="#" onclick="return GB_showFullScreenSet(page_setWEB1, 1)"><img src="images/Thumbnails/IMAGE-NAME.jpg" /><br />Link Label</a>
    This line trggers a pop-up style portfolio image slideshow.  I am trying to figure out how to trigger this event from actionscript.  I am not sure what this would even be called so any help would be great.
    Thanks,
    Brett

    The communication works both ways.  Here's the description from that page.
    "From ActionScript, you can call any JavaScript function on the HTML page. It passes any number of arguments of any data type, and receives a return value from the call.
    From JavaScript on the HTML page, you can call an ActionScript function in Flash Player. The ActionScript function can return a value. JavaScript receives it immediately as the return value of the call."
    It can be a bit confusing to implement, so you might want to search for other examples/tutorials if you can't get it working from the one linked already.

  • Adobe Reader Plug-in - Detect Events in Javascript?

    Hello,
    Does the plug-in provide events that Javascript can handle?     I have code that will trigger the printing to starting showing the print dialog via javascript.   I want to know when the user got rid of the dialogbox by either printing or canceling.   I don't necessarily need to know which button they pressed but that would be ok too.    If it's possible, can you give me a sample code of how I can do that?
    I am using IE as the browser.
    Thank you for time...
    Nathan

    The default zoom for the plugin should be the same as for the standalone Reader.  Is it not?

  • Onunload event not firing on firefox 27.0.1

    when i close firefox browser Onunload event is not firing

    Thanks, I filled a bug:
    * https://bugzilla.mozilla.org/show_bug.cgi?id=974383

  • How can launch an event in javascript?

    Hi, i´m doing an app in jsp, but i´m using a framework in javascript, css... my problem is... how can launch an event in javascript?
    I have a menu bar in javascript, and i want launch an event in each option, how?
    Thanks,

    Hi Victor,
    well, onMouseUp("blablup");
    I do not finally get your problem - do you want to send an event? So just add it to the URL and send the URL  -or do you want to excut the form? Why then not add the "event" to a hiden field in the form and execut that form then?
    In the handler you can ask for the details of the hidden field.
    I think it is not exactly what you are fter - but it could be that this is anyay a solution.
    Regards,
    Oliver

  • How to trigger the "click" event using javascript in LC8?

    I have 2 button in the form. I don't want the user to click the button1 directly (invisible now). but I want the user click the button2 and then do some checking. after checking is finisined,  the script will continue to trigger the button1 "click" event. How to trigger the button1 "click" event through javascript in LC 8? Thanks.

    button2.execevent("click");

  • How to detect back browser event in javascript?

    How to detect browser event in javascript?
    Not working for me. Since i love mozilla to use.
    Working in IE.
    function HandleBackFunctionality(event)
    if(window.event)
    alert("Browser1");
    if(window.event.clientX < 40 && window.event.clientY < 0)
    alert("Browser back button is clicked...");
    else
    alert("Browser refresh button is clicked...");
    else
    alert("Browser2");
    if(event.currentTarget.performance.navigation.type == 1)
    alert("Browser refresh button is clicked...");
    if(event.currentTarget.performance.navigation.type == 2)
    alert("Browser back button is clicked...");
    }

    Firefox doesn't have a catch-all event object (window.event), but you can create event listeners for the objects of interest. I don't know whether the toolbar is one of those; probably not, since why should web pages be able to see what you are doing on the toolbar??
    If we discard the idea of looking for events outside of the page and focus on what is happening inside the page, have you looked at this:
    https://developer.mozilla.org/en-US/docs/Web/API/Window.onbeforeunload

  • Touchend event in javascript running in UIWebView creates memory leak

    I have an iPhone app that has a UIWebView on the main view.
    If I load a html page from the bundle that registers for the touchend event in javascript, each time the event is called it leaks memory.
    I can even have the function that is called by the event be empty and it still leaks.
    If I remove registering for the event then the leak never occurs.
    Any ideas on how to fix prevent the leak?
    Thanks!

    I just discovered the same problem as you.
    Did you ever find a solution to this problem?

  • Hangling OnProgress event in JavaScript

    Hi,
    Does anyone have an example of working code that loads movie and subribes for OnProgress event in JavaScript and this event is fired?
    I don't have such one. In my examples OnProgress event and even OnReadyStateChange are not fired at all for flash movie.
    I used the following example:
    <html>
    <head>
        <script type="text/javascript">
        var FlashHandling = {
            OnProgressHandler: function() {
                alert("OnProgressHandler: ");
        </script>
    </head>
    <body>
        <object width="470" height="353"
                onreadystatechange="FlashHandling.OnProgressHandler()"
                onprogress="FlashHandling.OnProgressHandler()"
                >
            <PARAM name="movie" value="http://video.rutube.ru/e9cc55959af333eb3725d6111da30590" />
            <PARAM name="wmode" value="window" />
            <PARAM name="allowFullScreen" value="true" />
            <EMBED src="http://video.rutube.ru/e9cc55959af333eb3725d6111da30590"
                id="movie"
                name="movie"
                type="application/x-shockwave-flash"
                wmode="window"
                width="470"
                height="353"
                allowFullScreen="true" >
             </EMBED>
        </object>
    </body>
    </html>

    Hi Frank
    thanks for your response but then also it is not working.
    I have on main jspx page in which i am having region, the region contains fragment with that custom component.
    firstly the javascript code is not loaded on the page then i get the key event but when i refresh the page the javascript code,
    is loaded on the page and then i do not get the key event
    regards
    Praveen

  • Dispatching event from Javascript

    Can I dispatch events from javascript to flash player? I am trying to do so by calling dispatchEvent() on flash player dom object but the event is not passing inside flash player. Any links or clue?

    To be specific ... I can catch a right click and supress it. But I want to send it to flash (lets say) as a left click. Problem is when i do that, javascript listner for dom element will get fired for left click but there wont be any events in flash.
    SO the question is can i fire events on flash from outseide or is it outside the public APIs?

  • Pass Mouse click events from JavaScript to Falsh Movie

    Hi,
    I have an interesting problem here.
    i am trying to create a web page which has my
    flash-presentation movie. i need to disable mouse click &
    keyboard click navigation of the flash movie. The only way by which
    i can navigate my slide in the flash movie should be using 2
    buttons say Next & Prev that are i my web page.
    when i click the Next button i should be able to go to the
    next slid or the animation in the same slide like how i do in the
    power Point.
    Is there any way by which i can send these mouse click
    events from my javascript to my flash movie or is there any other
    means by which i can achieve this.
    ~Blackperil

    Hi Mathias,
    What i understood is that you want to triger a server side event (simulate onClick event of button)from a client side event (javascript confirm popup), based on the choice of user..
    You can also try this one...
    Check = confirm("Do you really want to proceed?");
    if (Check == true)
    document.getElementById('do_proceed').click();
    else
    document.getElementById('do_cancel').click();
    Regards,
    Anubhav

  • Add application and document level events using javascript

    Hi All,
    I need to do some validation in the preprint event of the pdf document. There are samples available using the UI and adding the script in the script dialog, but my requirement is that i need to map the 'preprint' event and event handler to the pdf document using pure javascript code without the UI. Any help would be greatly helpful. Thanks in advance.
    Regards,
    Charan

    You can write a document-level function into the actions handlers using the doc.setAction() method from a folder-level script, but one folder-level script cannot create another.
    Suppose you have a folder-level function triggered by a menu item, and it has collected a reference to the active document as oDoc:
    var myScript = 'console.println("I am about to be printed and I have " + this.numPages + " pages" );';
    oDoc.setAction("WillPrint",myScript);

  • Handling ActiveX events with Javascript inside BSPs

    Hi,
    Has anyone any experience with handling events from ActiveX objects (using the <object> tag) with Javascript, inside BSPs?
    I'm developing solely for the IE browser. Reading other threads, I know that the usual way this is done is via the below code excerpt:
    <i><script type="text/javascript" for="MyObject" event="Object_Event">
         js_function();
    </script></i>
    I create a HTML page, with the <object>, <script..for..event> tags, etc. Everything works fine when the page is run from my local system. However, when the code is run from WebAS (Activate then Test (F8)), the ActiveX object loads fine. But the javascript does not respond to events thrown by the ActiveX object.
    I wonder if anyone can share their experiences on this issue.
    Thank you.
    Amos

    It's the Skype4COM (v1.0.0.17) wrapper for the SkypeAPI, available at https://developer.skype.com/Download
    (Note: NOT the v1.0.0.16, which comes with the Skype ActiveX Tools package).
    I'm trying to use javascript to handle the event "CallStatus", thrown by Skype4COM, as shown in the code excerpt below.
    <i><script language="javascript" type="text/javascript" for="Skype" event="CallStatus(Call, Status)">
                 handleCallStatus (Call, Status);
    </script></i>
    It works locally, but not when in a BSP.
    It's rather interesting to mess with Skype calls from a webpage. Do let us know how your experience goes
    Amos

Maybe you are looking for