473,659 Members | 3,348 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 4571
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
3680
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 and passes it two parameters. For the life of me I cannot figure out what the error is, but one occurs everytime I click a &%*$&# radio button. Also, the function only alerts the user immediately as to what question/answer they clicked. I am...
4
31650
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 beneath the button in each of the texts at the end there's a third button to make the text dissappear again
0
3698
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. 2User can select from drop down, click add button and add selection to database. A)Datagrid binds and deletes fine. B)If I select the first value of drop down addition to database works fine. C)<problem>if I select the 2nd value of drop down it...
5
7713
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), it´s possible? Thanks. Regards, José.
5
2577
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 is the code for this. the onclick event calls a javascript function which I put an alert in the firt line to tell me if its working. It does work in IE. Any ideas on how to get netcrap... oops, I'm sorry, netscape to fire the onclick event? ...
4
17136
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 with the first row, but after I add a row, the Function does not work (no runtime error or anything). So first is my Function do the validation, second is my code for adding new row (this is where I'm having trouble, maybe with the setAttribute??),...
7
2789
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 following is a snippet of the script. What is keeping it from working? function displaycards1(){ document.form1.reveal1.value="Play Again"; document.form1.reveal1.onClick="setcards();"; } </script>
3
6490
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 event. I'm stumped with this one, any assistance would be appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"...
10
4169
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 href='#'><img src='./images/search.gif' border=0 onclick='return getCustomer(search.email.value);'></a><BR><BR></td>
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8335
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2752
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 we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.