How can I submit a httprequest in javascript

I would like to submit the url like that : "ReportController?action=logout" in javascript, how can I do that? Because I have implemented a logout menthod for windows onbeforeunload event, which means when user close brower, the logout action will be automatically triggered and submitted to server. I use the below method, but it seems doesn't work.
function logout() {
document.mainform.method="post";
document.mainform.action="ReportController?action=logout";
document.mainform.target="_self";
document.mainform.submit();
Message was edited by:
henry_22
Message was edited by:
henry_22

Just do a redirect to that page?
Looking to your post history: http://forum.java.sun.com/thread.jspa?threadID=5179905
Rather cleanup old sessions on login, not on logout. This saves a heap of those nasty stuff where you certainly cannot have the full control over.

Similar Messages

  • How can I submit the page from javascript in html header?

    I followed
    http://www.oracle.com/technology/products/database/htmldb/howtos/htmldb_javascript_howto2.html#client
    It says "doSubmit('Delete');" to submit the delete action.
    If I do the same in the java script that is embededed in html header, it does not work.
    I am assuming 'Delete' is the name of the button here.
    I also tried:
    document.forms[5].submit(); --> does not work
    document.formname.submit(); --> does not work
    I want to know:
         how I get the form name. I am assuming that this is the name in Name field in "Page definition" or is this page number?
         how to sumit a form from the javascript in html header

    sudheshna,
    function deleteConfirm(msg)
    should be
    function Confirmdelete(msg)
    cheers
    KIM

  • How can I access xml document from javascript whithin a JSP page

    how can I access xml document from javascript whithin a JSP page?
    I have a JSP that receives an XML document from a JavaBean, so I can access it within the entire JSP, but I need to access it from the javascript inside the JSP... and I have no idea how i can do this.
    Thanks in advance!

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • I want to connect a FLIR camera to my iPad. How can I submit a PAL signal to my iPad?

    I want to connect a FLIR camera to my iPad. How can I submit a PAL signal to my iPad?

    Thanks, too bad. Now I have to get a different tablet, ****.

  • How Can I Submit A Concurrent Program Using Form Personalizaton?

    How can I submit a concurrent program? Please help!
    Thanks in advance
    PhuTri

    I think the problem in your case coould be that the Concurrent Program you are trying to run has not been registered in the responsibility from which you are runnig it.
    For eg. You are trying to run a program from Inventory Super User responsibility and the request group attached to the responsibility is say 'RG Inventory', but the concurrent program which you are trying to run from your inventory super user responsibility is registered under some other request group say 'RG Order Mangement' which is not attached to the nventory responsibility.
    So register the program under correct request group and see if this helps you.
    Other possibility is that check if you have permission to submit request from that responsibility. You can check this by going to the Menu ->View If the Request menu is disabled then you cannot submit the request.

  • How can i submit form-data with acrobat pocket pc

    how can i submit form-data (http-post) on a PPC?
    how can i store the data offline?
    which submit-functions are availabe for the pocket pc reader?
    do i need ARES?
    where can i find a documentation of of the available functions for the ppc version?
    where can i fond form-samples for ppc?
    from the docu on my pocket pc:
    Submit form data using handheld devices over a wireless connection. If you are working offline, the data is temporarily stored, then submitted once a connection is established. Send forms by e-mail or directly to the destination server using a cradle or cable

    To your question regarding the Pocket PC version of Reader, I downloaded Adobe Reader for Pocket Pc 2 and installed it on my HP iPAQ . I then loaded my test PDF file onto the iPAQ. The Reader for Pocket PC preformed an email submission fine. However, I received no indication that anything happened when I tried an HTTP Post. So I think you can only do an email submission.
    In general, I have been testing to see how much I can do without the Live Cycle Reader Extensions, since for sure I will never be able to purchase them. What I have found is that for Acrobat Reader 7, the email submission works for all of the people I have asked to test it, but the HTTP Post has worked for only one of the two people who have tested it so far with Reader 7 (the one for which it worked claims that he only has Reader 7 on his computernot Acrobat).

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • How can recipients submit completed PDF forms using a MAC?

    We have created fillable PDF forms using LiveCycle Designer 8.0.  They include
    submit buttons that are set to submit the completed forms as PDFs.  Rights have been extended for Adobe Reader users.  They work great when the recipient is using a PC, but when they are using a MAC we have a number of problems:
    1) the Print and Submit buttons do not work
    2) when the recipient saves and e-mails the file manually, the data they entered is only visible when you click on that field
    Help!  How can our MAC recipients submit their completed form as a PDF that displays all of the data!
    Thanks!

    Thanks Niall.  This information proved really helpful in confirming the problem.  We ran some tests and the problem does seem to only occur when MAC recipients are using Preview.
    We recieved this link from Adobe, which provides a solution if you have access to all the recipients:
    http://blogs.adobe.com/pdfdevjunkie/script_to_fix_mac_osx_previewa.html
    Thanks to Niall and Paul for all your help!

  • How can I submit a form that depends on another form?

    Hello,
    I have a jsp with 2 different forms. The one is a Login form and the other one does some calculations.
    In my servlet I want to be able to proceed with the calculation form (when I click submit) only if someone is logged in.
    How can I do that? Any suggestions please?

    Actually what I did is when I submit the calculation form in my servlet I am requesting the login bean ( this is where I store the username and password if a customer logs in, plus a boolean variable to keep track if someone is logged in or not) like that:
    Login login = (Login)session.getAttribute("login");
    But I want somehow to get the Bean boolen variable and check if it is true or false, but I don't know how to do it. I did the following and it didn't work:
    //create a new boolean variable to store the Bean boolean
    boolean checkLoggedIn = request.getIsLogged();
    Any suggestions?

  • How can I submit evidence that I am a student?

    I tried to submit evidence that I am a student but apparently exists an error in the system. How can I continue with this process. I already bought my product but I cannot download it yet because I assume that I have not sent evidence yet.

    You can download the trial version of the product and use it for 30 days until you resolve your student status.
    For details regrading the student/teacher provisions you can refer to the following information page:
    http://helpx.adobe.com/x-productkb/policy-pricing/education-faq.html#main_submit_poe
    Another good resource for getting information is the student and teacher edition information forum:
    http://forums.adobe.com/community/download_install_setup/student_and_teacher_edition_infor mation_?view=discussions
    If you think you need to contact someone in support directly, then try using chat or telephone support and see if they can help. 
    Here are some links to help make contact:
    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

  • How can I group two annotations with JavaScript?

    I create two annotations with JavaScript:
    var annot1 = this.addAnnot({
                      page: 0,
                      type: "Square",
                      rect: [150, 150, 180, 180],
                      name: "OnMarketShare",
                      author: "A. C. Robat",
                      contents: "This section needs revision."});
    var annot2 = this.addAnnot({
                      page: 0,
                      type: "Square",
                      rect: [200, 200, 300, 300],
                      name: "OnMarketShare",
                      author: "A. C. Robat",
                      contents: "This section needs revision."});
    How can I group them with JavaScript?

    Can I select them in JavaScript Code?
    like:
    annot1.selected = true;     //wrong JavaScript code.
    annot2.selected = true;     //wrong JavaScript code.
    annot3.selected = true;     //wrong JavaScript code.
    annot4.selected = true;     //wrong JavaScript code.
    If I can do these, I can group them easily : right-click them, and then, click "group" button.

  • How can I submit the form back to the server, then reload the page again

    Hi
    I have 2 comboboxes, one is already populated with data by the time the page is loaded. The second combobox will be populated depending on the value chosen from the first combobox
    I need to know how can submit the form to go back to the server with the selected value from the first combobox, get some data from the database and then regenerate the whole page again filling the second combobox with the collected data
    for example, here s my select tag:
    <select name="country" id="firstBox" onchange="populateSecondList()">
         <option value="" SELECTED>
         </select>
    <select name="city" id="firstBox">
         <option value="">
         </select>
    what should I have to add in the retrieveSecondOptions() function?

    declare a second combo box in a iframe and to iframe tag there is attribute to which you can sepcify the file name like one.jsp
    now call onchange event on first combo box and forward request to one.jsp

  • How can I submit proof of my student status?

    I cannot get the customer support portal to work, and need to submit my Student ID to have my purchase of Adobe Pro approved (for student pricing). How can I do this?

    See http://www.adobe.com/education/students/how-to-buy-eligibility.edu.html

  • How can I force Firefox to override javascript when opening links with ctrl+click?

    There are certain sites that always open up a link in the active window despite said links being opened by ctrl+clicking it. Basically what happens is that a java script on the site forces the active window to load the link while at the same time Firefox follows the ctrl+click command and loads it in a new tab. You end up with two tabs with the same information and always have to go back in your original tab to be able to open other links.
    Usually you can open the link the way you want by right-clicking and selecting 'Open Link in New Tab' but for some reason ctrl+click is treated as if it was a regular click. How can I stop this from happening and force Firefox to ONLY load the new tab?
    This problem is not specific to the version of Firefox I'm using or the operating system, but seems to be caused by java script on the site. Disabling java scripts makes the problem go away but sometimes it also disables the sites.

    If you're trying to protect your browser from hackers, I'd recommend setting up a master password for your saved passwords. Other than that, your anti-virus and firewall are responsible for keeping your computer safe.
    If you're trying to protect your browser from someone else (i.e. somebody who can physically use the computer) just lock your entire computer with a password. If someone else has to use it, you could try letting them use the guest account.

  • I found a bug in multitasking in ios 7, how can I submit this bug to apple to help engineers fix it

    I found a bug, how can I pass it on to apple engineers to help them fix it

    I recall hearing (in another post, maybe yesterday) of a multitasking bug that Apple engineers were asking a user to test...I'll see if I can find it.
    EDIT: Starting at the bottom on page 2 (how to test) and continuing with more details for testing on page 3 https://discussions.apple.com/message/23666433#23666433

Maybe you are looking for

  • Few Questions on interfaces...

    Hi all, I have a few questions on interfaces...can any one provide the solutions for these please.. - What are physical and logical file paths and names. - how do we recognize whether the files are stored in Application server or presentation server

  • No photos in gallery but still 2.6GB taken from memory to photos

    I deleted all my photos in my iphone and in itunes I cheack out the V from photos sync (anyway i never sync any photos from itunes before) and still when i cheack on itunes and in the iphone it self how my memory is spillted 2.6 Gb is ascribed to pho

  • Download failure to Nokia 6230i

    I have a Nokia 6230i, with firmware V03.70. I cannot download wallpapers, video clips & some ringtones. I have tried different sources for the content, ie vodafone live, monstermob, but I receive the same error message - 'Downloading failed'. I've be

  • Canvas support in Indesign scripts?

    Hi there, short version: I was wondering if it is possible in any way to include auto generated raster content (Using canvas api for example) in in-design using JavaScript? Long version: I noticed that In-design supports a very old version of JavaScr

  • Regarding sapsscript

    can you please tell me &VBDKL-BRGEW(I13)& what (I13) signifies regarding the layout set in sapscript in?i am beginner ?thank you.