The way I was doing it was looping through an array of items to go in the drop down list, and on each iteration I was checking if the current item is == what we need to default it to, if so I would output the word "selected" so my html output looked like this:
Code: Select all
<option value="e;10"e; selected>10</option>Code: Select all
<option value="e;10"e; selected="e;selected"e;></option>What really stumped me is I was able to copy and paste my entire html output into dreamweaver and the wysiwyg engine correctly defaulted to 10, I then thought.. wait a minute, dreamweaver uses IE's dlls for parsing html right? So I load up my page in IE and everything works flawlessly.
Turns out the problem is if your drop down box is not inbetween <form> tags it won't default to what you tell it to. This is really stupid if it is an intended feature because a lot of web sites use drop downs with javascript for non form related tasks.
Just thought I'd post it on here in case anyone has a similiar problem, or if anyone knows what the purpose of this functionality is.