Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button

Status
Not open for further replies.

jliz2803

IS-IT--Management
Mar 21, 2005
45
CA
I am pulling information from a database, from a table named GMAC and the field name is GMAC_Disabled. It can only contain the values of yes or no, I want the radio button with the corresponding value from the database to be checked for each record. Here is the code for the raio buttons

YES<INPUT TYPE=radio VALUE='YES")
Response.Write ("' SIZE=")
Response.Write (ScriptDataDictionary.Item ("GMAC_Disabled"))
Response.Write (" NAME=GMAC_Disabled MAXLENGTH=")
Response.Write (" >NO<INPUT TYPE=radio VALUE='NO")
Response.Write ("' SIZE=")
Response.Write (ScriptDataDictionary.Item ("GMAC_Disabled"))
Response.Write (" NAME=GMAC_Disabled MAXLENGTH=")
Response.Write (">

Any Suggestions???
 
[1] What is the idea of having MAXLENGTH= followed immediately by a space then closing angle bracket or by just a closing bracket?

[2] To make the button checked by default, you can insert the response write just before ">" with something like this replacing ">" itself.
[tt]
if lcase(rs("GMAC_Disabled").value)="yes" then
response.write " checked " & ">"
else
response.write ">"
end if
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top