Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By Tolls

Thread: form.action

  1. #1
    garyking is offline Member
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    0

    Question form.action

    Hi all,

    I am new to JavaServer Pages and I am unsure what a piece of code means.

    The code below, I believe, is creating a new lobby. This function works but I need a delete function also. I am confused as to what the 2nd line of the code is doing.

    Any tips?

    CODE:

    var form = document.getElementById("form1");
    form.action = "createLobbyByAdminAction.action?";
    form.method = "post";
    form.submit();

    END OF CODE

    Thanks

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,172
    Rep Power
    20

    Default

    That's Javascript, so not really the best place for the question.
    However, that second line is setting the action for the form (ie what the form does when submitted) to createLobbyByAdminAction.action.
    Not sure the '?' is necessary at the end.
    drumer12 likes this.

Similar Threads

  1. Replies: 1
    Last Post: 06-30-2011, 10:49 AM
  2. Struts action form not returning object
    By niteangell21 in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 02-08-2011, 06:50 PM
  3. Replies: 8
    Last Post: 10-03-2010, 10:45 AM
  4. Replies: 3
    Last Post: 08-19-2010, 09:27 AM
  5. Errors come when i set attribute in request in Action Form
    By 82rathi.angara in forum New To Java
    Replies: 3
    Last Post: 09-22-2008, 03:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •