Forum Moderators: open
Here is the original code snippet. I have added 'checked' in like a ton of different ways.
checked
CHECKED
checked="true"
checked="Yes"
and many many others
<input type="checkbox" name="Brochure" value="Yes" tabindex="12">
<input type="checkbox" name="Brochure" value="Yes" tabindex="12" SELECTED>
or maybe if you didn't insert the CHECKED attribute that way you should try that. This works for me with radio buttons.
*dang! that's two days in a row that I post just behind someone. :) Good answer k2000
It simply does not come up pre-checked.
I have been using Dreamwaver. I can goto the checkbox properties and select the default state their. And in their WYSIWYG environment it shows checked. Then view in browser and its not checked. Upload to server and then test live and its not checked. -- I also did this my hand entering the HTML. And tried many different syntax.
The last test I just did was selected. I ran it from the server, then did view source. Scrolled thru the source and selected was in there. But its not checked.
Its like IE 6.02 or what ever the latest is, is simply ignoring this. Maybe its my machine? hmmm... Called friend. Had them test it. Nope does not work their either.
<input type="checkbox" name="Brochure" value="Yes" tabindex="12" <% if fBrochure = "Yes" then %> <%= CHECKED %><% end if %>>
the variable fBrochure does get set, as its what get send to me in the email. It is set back at the top of the page after the submit button gets pressed. So I think that part is ok. But it does not remember the state.
This was/is not appearing to work. I was thinking it was my .asp code. I figured I could prove that. Thats when I tried to back up and just make sure 'checked' worked. It didnt seem to work either. So I spent this morning messing with that. Now that that seems to be out of the way, back to the original goal.