|
-
Mar 13th, 2001, 06:04 AM
#1
Hi everyone!
I have an input page on which I have a few selectboxes, each with the same name, but a different value. The selectboxes are placed on the page using an include file. After placing the boxes, I want to make a few of the options checked, but since they are already in my page, I need to use Javascript for that.
I have tried different ways, but none has worked yet. Any ideas?
I have the value of the option I want to have checked in a variable called TheseNeedToBeChecked. These are some of the ways I tried:
=====================================
var CheckThisOne = <%= TheseNeedToBeChecked %>;
myform.hobbies(CheckThisOne).selected = true;
myform.hobbies[CheckThisOne].selected = true;
myform.hobbies(CheckThisOne).selected;
myform.hobbies[CheckThisOne].selected;
myform.hobbies(CheckThisOne).checked = true;
myform.hobbies[CheckThisOne].checked = true;
myform.hobbies(CheckThisOne).checked;
myform.hobbies[CheckThisOne].checked;
=====================================
Any help would be highly appreciated. 
Marcel
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|