P
pbd22
I need help understanding how to read multiple form elements on a
page
that one, individual "submit" button can send to their respective
action= tags.
So the "registration" page has, say 5 forms on it, each has its own
data that
has to be sent to the server (lets say, different server pages for
different types
of processing:
<form id=form1 action=page1.aspx method=post>
</form>
<form id=form2 action=page2.aspx method=post>
</form>
<form id=form3 action=page3.aspx method=post>
</form>
<form id=form4 action=page4.aspx method=post>
</form>
<form id=form5 action=page5.aspx method=post>
</form>
how should i construct this? I have a script for reading the
individual forms
on this page:
readforms = function (fromwhere){
var nestedForms = $(fromwhere).select('form');
var formElements = [];
for (var i = 0; i< nestedForms.length;i++) {
if (exist(nestedForms)) {
formElements.push(nestedForms.serialize());
}
}
alert(formElements.inspect());
}
and this is my submit tag:
<a href='#' onclick="readforms(this);"
class="textBtnRed"><span>Publish</span></a>
Could somebody explain to me how to use this code to "fire" each form
for processing on
the server? What I am working with is not changable - no input tags,
no runat=server no single
form tag. This is per the customer's request.
please help. thanks.
peter
page
that one, individual "submit" button can send to their respective
action= tags.
So the "registration" page has, say 5 forms on it, each has its own
data that
has to be sent to the server (lets say, different server pages for
different types
of processing:
<form id=form1 action=page1.aspx method=post>
</form>
<form id=form2 action=page2.aspx method=post>
</form>
<form id=form3 action=page3.aspx method=post>
</form>
<form id=form4 action=page4.aspx method=post>
</form>
<form id=form5 action=page5.aspx method=post>
</form>
how should i construct this? I have a script for reading the
individual forms
on this page:
readforms = function (fromwhere){
var nestedForms = $(fromwhere).select('form');
var formElements = [];
for (var i = 0; i< nestedForms.length;i++) {
if (exist(nestedForms)) {
formElements.push(nestedForms.serialize());
}
}
alert(formElements.inspect());
}
and this is my submit tag:
<a href='#' onclick="readforms(this);"
class="textBtnRed"><span>Publish</span></a>
Could somebody explain to me how to use this code to "fire" each form
for processing on
the server? What I am working with is not changable - no input tags,
no runat=server no single
form tag. This is per the customer's request.
please help. thanks.
peter