lloydmav
07-21-2008, 11:57 AM
Hi,
Really hope someone can help me with this.
I have a submit button in a form and I would like to get the submit button to do two things.
Firstly I would like to get it to insert a db record. This I have working on its own using the following form code:
<form action="<%=MM_editAction%>" method="POST" name="form1">
<input type="text" name="first_name" id="first_name" tabindex="2" />
<input type="text" name="last_name" id="last_name" tabindex="3" />
<input type="text" name="email" id="email" />
<input type="submit" name="insert" id="insert" value="Continue" />
<input type="hidden" name="MM_insert" value="form1" />
</form>
the <%=MM_editAction%> does the insert record stuff in the asp javascript bit at the beginning.
Secondly I then need to be redirected to another page 'subscriptionpt2.asp', but I need to pass a form variable with it so that I can identify this record again. I have managed to get this working sepertely using the following code:
<div id="mainContent">
<form action="subscriptionpt2.asp" method="post" name="form1">
<input type="text" name="first_name" id="first_name" tabindex="2" />
<input type="text" name="last_name" id="last_name" tabindex="3" />
<input type="text" name="email" id="email" />
<input type="submit" name="insert" id="insert" value="Continue" />
</form>
<!-- end #mainContent -->
</div>
I have both things working fine on their own but how do I combine the two actions so that when I click submit they both happen and I can pick up the email variable in the next page???
Really stuck with this:confused:
Thanks
Really hope someone can help me with this.
I have a submit button in a form and I would like to get the submit button to do two things.
Firstly I would like to get it to insert a db record. This I have working on its own using the following form code:
<form action="<%=MM_editAction%>" method="POST" name="form1">
<input type="text" name="first_name" id="first_name" tabindex="2" />
<input type="text" name="last_name" id="last_name" tabindex="3" />
<input type="text" name="email" id="email" />
<input type="submit" name="insert" id="insert" value="Continue" />
<input type="hidden" name="MM_insert" value="form1" />
</form>
the <%=MM_editAction%> does the insert record stuff in the asp javascript bit at the beginning.
Secondly I then need to be redirected to another page 'subscriptionpt2.asp', but I need to pass a form variable with it so that I can identify this record again. I have managed to get this working sepertely using the following code:
<div id="mainContent">
<form action="subscriptionpt2.asp" method="post" name="form1">
<input type="text" name="first_name" id="first_name" tabindex="2" />
<input type="text" name="last_name" id="last_name" tabindex="3" />
<input type="text" name="email" id="email" />
<input type="submit" name="insert" id="insert" value="Continue" />
</form>
<!-- end #mainContent -->
</div>
I have both things working fine on their own but how do I combine the two actions so that when I click submit they both happen and I can pick up the email variable in the next page???
Really stuck with this:confused:
Thanks