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

Onclick send value of text box.

P: 19
I want to send the value od the textbox when the user click update Button:
i have written this code but i thikn there is some syntax error it dosent send the value insted it sends the string "document.form......"

Expand|Select|Wrap|Line Numbers
  1. sql = "select * from productPrice"
  2. sql, conn
  3. do while not rs.eof %>
  4. <tr>
  5.     <td><font color=black size="2"><%response.Write rs("productCode")%></font></td>
  6.     <td><input type = "text" name="<%=rs("productCode")%>" value="<%=rs("price") %>" />
  7.         <input type = "button" value="Update" onclick="javascript:document.location.href='ProductPriceUpdate.asp?ProductCode=<%=rs("productCode")%>&price=document.form.<%=rs("productCode")%>.value'"></td>
  8. </tr>
  11. <%
  12.     rs.moveNext
  13.     loop
  14.     rs.close
  15. %>
  16. </table>

any help is apprecuated thanks
Jul 2 '08 #1
Share this Question
Share on Google+
2 Replies

P: 13,264
When you click the submit button, the whole form is submitted to the server with all the fields that are on it (including that textbox's value). There is therefore no need to add the textbox's value in the url.
Jul 3 '08 #2

Expert Mod 15k+
P: 16,027
sva0008, please enclose your posted code in [code] tags (See How to Ask a Question).

Jul 3 '08 #3

Post your reply

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