473,503 Members | 756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Onclick send value of text box.

19 New Member
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. rs.open 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>
  9.  
  10.  
  11. <%
  12.     rs.moveNext
  13.     loop
  14.     rs.close
  15. %>
  16. </table>

any help is apprecuated thanks
Jul 2 '08 #1
2 4565
r035198x
13,262 MVP
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
acoder
16,027 Recognized Expert Moderator MVP
sva0008, please enclose your posted code in [code] tags (See How to Ask a Question).

Moderator.
Jul 3 '08 #3

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

Similar topics

8
3666
by: Shock | last post by:
Hello everyone, I am having a problem with the program below. I have isolated the problem to the onclick event that is located throughout arrQuestions. The onclick event refers to a function...
4
31635
by: Frank Hoek | last post by:
Hi, I try to create the following: 2 buttons next to each other, on a webpage button 1 makes (onClick) text 1 appear just beneath the button button 2 makes (onClick) text 2 appear just...
0
3683
by: LU | last post by:
I have a datagrid for viewing and deleting. Under that I have a drop down with binded info and a button to add the select drop down item into database. 1User can view datagrid and delete info....
5
7701
by: José Carlos | last post by:
Hi. I am trying send a text value when click in an image. If i write: onClick="javascript:document.client.submit();" send all form, but i want to send only a input type text (name = cod),...
5
2573
by: moondaddy | last post by:
I have a <a> element in a datagrid which wraps some asp.net labels. this element also has an onclick event which does not fire in netscape 6 (and perhaps other browsers for all I know...). Below...
4
17128
by: jj6849 | last post by:
I have been using the dom to add a row to my form for awhile now, but now I need to do some validation to make sure certain check boxes aren't checked with other check boxes. Now of course it works...
7
2773
by: extremerep | last post by:
My task is to change the value of a button and then make it functional with the onClick handler. Changing the value to "Play Again" works, but making the onClick work accordingly does not. The...
3
6477
by: Michael_R_Banks | last post by:
I'm trying to dynamically build a table that allows users to remove rows when they click a corresponding button. For some reason, whenever I add the button to the table, it never fires the onclick...
10
4158
by: art | last post by:
Hi, I have a form with an image button like this: <td><input type='text' name='search' id='search' value='' size=30><BR><span class=body><center>Enter Email Address</span><BR></ td> <td><a...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7089
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.