for loop inside select box
Whatup LQ, I have a pretty easy question for all you JS heads out there--
I'm getting a list of days of the week from MySQL DB inside a select box for an edit information page that involves an UPDATE; query, so the select looks like this:
How can I have it so that when the page loads up, the correct index value is selected in teh dropdown? For instance, if today is the 2nd of July, "02" is given the "selected" attribute...
Right now, I have it so that when I load up the page the correct and proper index only gets the selected attribute after I hit "refresh". In Firefox, that is.
basically i think it's something similar to onchange=location=this.options[this.selectedIndex].value;
but i'm sick of banging my head against teh wall tryin to figure it out. Any help is mucho appreciado, as always
Last edited by opioid; 03-17-2005 at 01:44 PM.