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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd behaviour with Radio Button

Status
Not open for further replies.

nzgirl

Programmer
Feb 26, 2003
72
NZ
I've just finished testing my code on one machine and have moved my files across to another server.

I have a field in a table (just added and populated) called MonthDay.
Its populated earlier and If I assign the value as in MonthDay = "D" if shows up correctly but the one from the file doesn't even though response.write it 1) after assignment and 2) just before the button.. prints to the screen correctly (either D or M)

The code in Q is...
<td align = &quot;Left&quot;><input type=&quot;radio&quot; name=&quot;MonthDay&quot; value=&quot;D&quot;<% if MonthDay = &quot;D&quot; then Response.Write &quot; Checked&quot; %>><span class=&quot;menutext&quot;>Days</span>
<input type=&quot;radio&quot; name=&quot;MonthDay&quot; value=&quot;M&quot;<% if MonthDay = &quot;M&quot; then Response.Write &quot; Checked&quot; %>><span class=&quot;menutext&quot;>Months</span></td>

any ideas? tips? pointers?

Thanks
:)
 
Don't Worry
Found that I'd set MonthDay to Char 10 rather than Char 1
varchar could have handled this but Char pads out the blanks and
&quot;M &quot; <> &quot;M&quot;

:-(
 
Thanks for letting us know the answer you figured out! :)

Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
- Creating &quot;dynamic&quot; Web pages that read and write from databases...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top