473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how to get the value of input text that is residing inside of a div?

rsbollocks
gud day to all guys,

here is my first post,

how can i get the value of the input text inside a div when the form is submitted.

- i can get the value of hdncivil input field using this syntax

civilstat= Request.Form("hdncivil")

- but when using the same method/syntax to get the minAge and maxAge
Expand|Select|Wrap|Line Numbers
  1.          minage= Request.Form("minAge") 
  2.          maxage= Request.Form("maxAge") 
  3.  
----------- the value of minage and maxage contains nothing


Expand|Select|Wrap|Line Numbers
  1. <%
  2. hdncivil = "single"
  3. d_min = "18"
  4. d_max = "65"
  5. %>
  6. <form id="FrmMain" name="FrmMain" method="POST" action="MCHRESav.asp" >
  7. <input type="hidden" id="hdncivil" name = "<%=hdncivil%>"  />        
  8. <div id="constraints">    
  9.   <input type="hidden" id="minAge" value="<%=d_min %>" />
  10.   <input type="hidden" id="maxAge" value="<%=d_max %>"/>
  11. <div>
  12. <input type="submit" id="BtnSave" name="BtnSave" value="save"  />
  13. </form>
thanks in advance,,
Apr 12 '10 #1
3 2663
MrMancunian
569 Expert 512MB
Change

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" id="minAge" value="<%=d_min %>" /> 
  2. <input type="hidden" id="maxAge" value="<%=d_max %>"/>
To

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" id="minAge" value="<%=d_min%>" /> 
  2. <input type="hidden" id="maxAge" value="<%=d_max%>"/>
Steven
Apr 17 '10 #2
@MrMancunian
thanks for your reply mrMancunian, i will try, see again on my future posts,,
Apr 18 '10 #3
Frinavale
9,735 Expert Mod 8TB
rsbollocks,

It looks like you need to add a name property to the hidden input fields in order for you to be able to access them in your ASP server code.

Add the "name" property to your minAge and maxAge hidden fields:
Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" id="minAge" name="minAge" value="<%=d_min %>" />
  2. <input type="hidden" id="maxAge" name="maxAge" value="<%=d_max %>" />
-Frinny
Apr 19 '10 #4

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

Similar topics

1
by: Oleg Konovalov | last post by:
Hi, We have an application which is a Java/JSP security wrapper to control access to the contents of the external corporate training Web site (courses). It is a Java/JSP/Struts application...
2
by: Angus Parvis | last post by:
Greetings, have a look at this HTML code: <td colspan="2"><input type="submit" value="Submit"/></td> I want to support internationalization. To do so, i define variables, that contain the...
12
by: Anna | last post by:
Hi all, I posted the same question this afternoon but my message isn't showing up, so I thought I'd give it another try.... in case you should see it later I apologize for posting the same...
16
by: cwizard | last post by:
I'm calling on a function from within this form, and there are values set but every time it gets called I get slammed with a run time error... document.frmKitAmount.txtTotalKitValue is null or not...
3
by: JK | last post by:
This is an easy one, but I'm a JS newbie. I want to write a function that determines input value. If 0 - 100 than will use input as % (i.e., 3 would become .03 and used for calculations);...
3
by: Justin Morris via DotNetMonster.com | last post by:
<asp:TextBox ID="TextBox1" runat="server" value='<%=Server.HtmlEncode (Request.Cookies("Username")("Username"))%>'/> <input name="Password" type="text" id="Password" value='<%...
6
by: paul | last post by:
HI! How do we send a variable from an Iframe page back to its parent? I have a script that calculates the iframe's window size but I need to know how to send that value back to its parent so I...
2
by: charles-brewster | last post by:
I'm trying to write a simple JavaScript function which will use a button to copy table cell data into a form input text box as the "value" attribute. The following is intended to test the...
2
by: Scott | last post by:
If I click the "Update" button on my form below, I can retrieve the value of my combo by using code in the FORM RESULTS section below. Therefore, if I choose the "Inside" option in my combo, I...
4
by: frank78 | last post by:
Hi all, I'm having an issue with passing form values from one page to the next. I wrote a function that I use to change the value of a hidden field to any number of dynamically generated form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.