Re: Options selectedIndex

by "Paul Wilson" <webgooru(at)gte.net>

 Date:  Thu, 5 Apr 2001 09:04:03 -0400
 To:  "Angie Michaels" <angiemichaels(at)blueyonder.co.uk>,
<hwg-languages(at)hwg.org>
 References:  hotmail celeron
  todo: View Thread, Original
> Can anyone tell me how I select a particular option from an option list to
> be the default.
>
> I'm carrying over a value from another page and want that value to be the
> selected on once the page has loaded.

With the carts I have used, the quoted "value" is what is passed to the
cart. Adding SELECTED="SELECTED" makes that value be the default.  In most
cases leaving that out makes the top option be the default usually, but who
knows how that works with so many browsers and operating systems. The second
size listed below without quotes is what shows up in the drop-down window.

<.SELECT NAME="Size">
<.OPTION SELECTED="SELECTED" VALUE="Large">Large</OPTION>
<.OPTION VALUE="Small">Small</OPTION>
<./SELECT>

Tags have periods added so this doesn't show up as a select box in many
browsers.

Paul Wilson
webgooru(at)gte.net

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA