ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  A Simpler Ajax Path
Subject:   Only uses the first form on a page
Date:   2005-06-15 05:45:12
From:   maYO
In your example the function formData2QueryString will always and only take the contents from the very first form on a page.


Changing two lines in that function would make it more modular:


function formData2QueryString(formName) {
var docForm = document.forms[formName];
.
.
.


So the only thing left to do is call that function and passing it the name of the form as argument.


1 to 1 of 1
1 to 1 of 1