Link to home
Start Free TrialLog in
Avatar of Shelmina_Shivji
Shelmina_Shivji

asked on

ASP

I have 10 buttons and textboxes. I need to get the value of each textbox and store it into an array using asp.
Is this possible. Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Sleepyhead_NO
Sleepyhead_NO

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shelmina_Shivji
Shelmina_Shivji

ASKER

Thanks for responding. But the problem is, when I submit the textbox value disappears as I am also calling a javascript function to disable the textbox. The first function "foo" enables the textbox. And the second one "foo1" disables the texbox.
The code is below. Thanks for your help.
Note: I am just trying with one textbox now.

dim i
response.write "<form name='myform' method='post'>"
response.write "<table border='1'>"
response.write "<tr><td><input type='textbox' name='try'  disabled='disabled'></td>"
response.write "<td><input type='button' value='Modify' onclick = 'foo(try)'></td>"
response.write "<td><input type='submit' value='submit' onclick = 'foo1(try)' name='submit'></td></tr>"

dim x
x = request.form("try")
 response.write x
if a textbot is disabled, it will not pass the value. use the readonly attribute instead. both of these attributes cannot have values, so writing disabled="disabled" is not correct - use <input disabled>.

with javascript it should be:
document.myform.try.readonly = true;

to make the checkbox looked disabled you can use CSS to modify the background or text color so it appears to be disabled. alternatively you can use the disabled attribute and with javascript get the value and put it in a hidden form element.