By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

Getting the Button's value

100+
P: 100
i do not want to submit for the "button" with the name "buttonname"...For some reason i want that button's value...once i submit i shud get "buttonvalue"...wat is wrong with my code???



Expand|Select|Wrap|Line Numbers
  1. <form name='rag' action='tt.asp' method='post'>
  2. <input  type='button' value='butonvalue' name='buttonname' />
  3. <input type='submit' value='OK' name='submit'/>
  4. </form>
  5.  
  6.  

tt.asp has this
Expand|Select|Wrap|Line Numbers
  1. <%
  2. response.write request.form("buttonname")
  3.  
  4. %>
  5.  
Feb 6 '08 #1
Share this Question
Share on Google+
2 Replies


Markus
Expert 5K+
P: 6,050
This isn't a html problem.
Post in the relevant forum.
Feb 6 '08 #2

100+
P: 428
I don't see anything not html about an html form question.


If you want to distinguish which submit button was clicked, give each button the same name, and a different value.

<INPUT TYPE="SUBMIT" NAME="submit" VALUE="buttonvalue">
<INPUT TYPE=SUBMIT NAME="submit" VALUE="OK">
Feb 6 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.