hi!
i wonder if anyone can help me with this problem.
i need to post the info from the forms (10 of them!) on my page at once. i'd like to do this from a function that could be called by any of the submit buttons on the page.
i think the best way to do it is to collect the info into a string which is then made equal to a hidden field which is posted with any of the forms.
i'm open to any ideas though.
i have to post the data as it will frequently contain more than 255 chars, so a get won't do.
i'm new to javasript so there may be some inconsistency in my code, but here's the general idea>>
then i need to make the stringbuff equal to a form variable and send it out. i'm really not sure how to do this.
thanks in advance for any help.
cheers,
q
i wonder if anyone can help me with this problem.
i need to post the info from the forms (10 of them!) on my page at once. i'd like to do this from a function that could be called by any of the submit buttons on the page.
i think the best way to do it is to collect the info into a string which is then made equal to a hidden field which is posted with any of the forms.
i'm open to any ideas though.
i have to post the data as it will frequently contain more than 255 chars, so a get won't do.
i'm new to javasript so there may be some inconsistency in my code, but here's the general idea>>
Code:
<script language="JavaScript"></script>
<!--
function StoreFormData(){
for ( k=0, k < 10; k++){ %> //loop for each of the ten forms on the page
f = "form_block"+String.valueOf(k) // make jscript variable = to the name of the form
for(n = 0, n < f.elements.length; n++){ //loop through each of the elements in the form
stringbuff+=f.elements.value;
}
}
}
then i need to make the stringbuff equal to a form variable and send it out. i'm really not sure how to do this.
thanks in advance for any help.
cheers,
q