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.
|
Showing messages 1 through 1 of 1.
-
Only uses the first form on a page
2005-06-15 20:54:11
fleegix
[Reply | View]
That lets you use the function with forms in other frames or windows, like this:
I'll update the code in the downloadable file. Thanks for catching that.