Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: onclick() - Goto WebPage


Message #1 by "Pam Will" <pwill@m...> on Tue, 28 Aug 2001 16:19:44 -0500
this.form returns a reference to the form object of that elements form. 
The form object also supports the submit() method, so this.form.submit() 
essentially submits the form containing that element, which sounds 
perfectly correct to me. It puzzles me as to how it "fixed" your 
problem, as it were :) Maybe the "action" property, when changed in 
JavaScript, submits the form automatically under the new action, and 
maybe by submitting the form just after changing the action overrides 
the first bit and submits the form with the original action. Just 
guessing :)

__________________________

http://www.gamerseurope.com/
__________________________
  ----- Original Message -----
  From: Pam Will
  Newsgroups: javascript
  To: javascript
  Sent: Wednesday, August 29, 2001 6:10 PM
  Subject: [javascript] Re: onclick() - Goto WebPage


  Jonas!  You are a genius!  Thanks so much!

  The change in code was simply taking off the stuff after the ; -- the
  this.form.submit() part and now it works great!

  Yahoo!

  Can you tell me what the purposes of the this.form.submit() was?

  Thanks again!

  "jonas jerndin" <jonas.jerndin@o...> wrote in message
  news:97534@j...
  >
  > I usually do it like this:
  >
  > page_2.asp:
  >
  > <form action=3D"page3.asp" action=3D"post" name=3D"form3">
  >
  > <input ty...>
  > <input ty...>
  > <input ty...>
  > <%for each item in Request.Form()%>
  > <input type=3D"hidden" name=3D"<%=3Ditem%>" 
value=3D"<%=3DRequest.Form(item)%>"><%
  > next%>
  >
  > <input type=3D"submit" value=3D"yes  ">
  > <input type=3D"button" name=3D"noBtn" value=3D"no  "
  > onClick=3D"this.form.action=3D'page4.asp';this.form.submit()">
  >
  > </form>
  >
  > Think it will do pretty much what you wanted to, as I understand it.


  Return to Index