View Single Post
Feb 17th, 2005
0

Re: Passing data from forms from one page to another

I would have put it in a function... but you can put it as an action if you want....such as
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <input type="button" value="hi" onClick="document.formname.submit();" />

or in a function.. because I like to test the form values with javascript BEFORE submitting it to the server-side.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function check_values()
  2. {
  3. if (document.formname.sometextbox.value == "") {
  4. alert("How About A Value in sometextbox buddy!?")
  5. return;
  6. } else {
  7. document.formname.submit();
  8. }
  9. }
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004