473,473 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

getting the value of a button

100 New Member
hi,
I have the following code to get the button's value..It is giving empty string....
Can anyone help in getting the value of type button

Expand|Select|Wrap|Line Numbers
  1. <form name='rag' action='tt.asp' method='post'>
  2. <input type=text name='ra'/>
  3. <input  type='button' value='Saks' name='Slskdfh' />
  4. <input type='submit' value='OK' name='submit'/>
  5. </form>
  6.  
  7.  
tt.asp contains
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <%
  4. response.write request.form("Slskdfh")
  5.  
  6. response.write request.form("ra")
  7. %></html>
  8.  
Feb 6 '08 #1
1 1146
CroCrew
564 Recognized Expert Contributor
Hello rag84dec,

I don’t know why you want to pass the value for a button on to the next page but if you truly want to you will need to use some JavaScript to do so.

Try this code:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <title>Example</title>
  4.         <script language="JavaScript">
  5.             function validate()
  6.             {
  7.                 document.rag.Slskdfh.value=document.rag.tempSlskdfh.value;
  8.             }
  9.         </SCRIPT>
  10.     </head>
  11.     <body>
  12.         <form method="post" action="tt.asp" name="rag">
  13.             <input type="hidden" name="Slskdfh">
  14.             <input type="text" name="ra">
  15.             <input type="button" value="Saks" name="tempSlskdfh">
  16.             <input type="submit" value="OK" name="submit" onclick="validate();">
  17.         </form>
  18.     </body>
  19. </html>
  20.  

Hope this helps you out~
Feb 6 '08 #2

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

Similar topics

8
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from...
4
by: gimme_this_gimme_that | last post by:
Hi, This is sort of a : How to build a Yes/No dialog box qquestion. Or perhaps a question about getting javascript variables from a pop-up window and processing them on a submit. This is...
1
by: Gunjan Garg | last post by:
Hello All, I am working to create a generic datagrid which accepts a datasource(ListData - This is our own datatype) and depending on the calling program customizes itself for sorting,...
1
by: bagya | last post by:
please help me out the following is the small code i have <html> <head> <script type="text/javascript"> function validate() { if (document.abc.region.value==0)
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
1
by: imranabdulaziz | last post by:
Dear All, I am mess with one situation let me explain the scenario. I am making search form where I display 15 field in checkboxlist and user select one or two or three or any no to all field....
1
by: ced69 | last post by:
having trouble getting marquee to work get object required errors tring t <title>This Month at the Chamberlain Civic Center</title> <link href="styles.css" rel="stylesheet"...
0
by: TG | last post by:
Hi! Once again I have hit a brick wall here. I have a combobox in which the user types the server name and then clicks on button 'CONNECT' to populate the next combobox which contains all the...
1
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
0
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
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,...
0
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...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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 ...
0
muto222
php
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.