eladr
asked on
select list
hi...
this is my simple select list:
<html>
<body>
<form>
<select name="cars">
<OPTION SELECTED VALUE="">choose car
<option value="1">honda</option>
<option value="2">peugeot</option>
</select>
</body>
</html>
my quetion: is there any option that if a user going to enter the page,
he will see one of the items and not the "choose car"?
i mean...in text filed i have the value that let me insert any string i want.
is there any way to do it in select list?
i want him to show him for example the "peugeot" option...
(that's call dynamic select list)
elad
this is my simple select list:
<html>
<body>
<form>
<select name="cars">
<OPTION SELECTED VALUE="">choose car
<option value="1">honda</option>
<option value="2">peugeot</option>
</select>
</body>
</html>
my quetion: is there any option that if a user going to enter the page,
he will see one of the items and not the "choose car"?
i mean...in text filed i have the value that let me insert any string i want.
is there any way to do it in select list?
i want him to show him for example the "peugeot" option...
(that's call dynamic select list)
elad
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanx a lot!
i asked that because i will use it
with asp - you are good!
i asked that because i will use it
with asp - you are good!
ie:
..
..
<script language="javascript">
<!--
function init() {
document.myform.cars.selec
}
//-->
</script>
</head>
<body onload="init()">
..
..
<form name="myform">
<select name="cars">
<option selected value="">choose car</option>
<option value="1">honda</option>
<option value="2">peugeot</option>
</select>
</form>
..
..
This example will select the 3th (0,1,2) option after the page was loaded.
xabi