Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

two buttons in form thanks

Status
Not open for further replies.

melnet

Programmer
Jul 8, 2003
77
HK
hi

<form name="update" method="post" action="">
.....
.....
.....
<input type=button name="update" value="Update">
<input type=button name="sendInquiry" value="Send inquiry">
</form>

i want update button goes to update.asp, sendInquiry goes to sendInquiry.asp in the form
how can i solve!?

thanks
 
Just add ONCLICK functionality to those buttons:

Code:
<input type=button name="update" value="Update" [b]onclick='this.form.action="update.asp";this.form.submit();'[/b]>

<input type=button name="sendInquiry" value="Send inquiry" [b]onclick='this.form.action="sendInquiry.asp";this.form.submit();'[/b]>

I think that ought to do it for you.

--Dave
 
You might want to reverse the quotes if that doesn't work. Every single one of my browsers gets confused sometimes when that is used.

opinion {
inline-styles: are-messy;
internal-stylesheets: waste-space;
external-stylesheets: are-bliss;
}
 

>> You might want to reverse the quotes if that doesn't work.

I agree entirely - although only because that's my personal preference (double-quotes for HTML, single for JavaScript).

Dan
 
I simply said that because my browsers get confused by:

onclick='this.form.action="update.asp";this.form.submit();'

but not by:

onclick="this.form.action='update.asp';this.form.submit();"

For some reason, my browser likes treats the second more importantly or else it doesn't understand it. Weird, eh? Oh well. That's why I got Mozilla after reading that question! :)

opinion {
inline-styles: are-messy;
internal-stylesheets: waste-space;
external-stylesheets: are-bliss;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top