I finally found something I don't like about firefox
Posted: Sat Jul 30, 2005 10:08 pm
I wanted to title this thread 'I finally found a bug in firefox' but I'm not sure if this is the intended functionality, you see I was writing a 'date selector' class (it's going to allow you to prompt users for a date and time using drop down boxes) and I started getting bugs when I coded the ability to let the date selector default to a certain time.
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:
Now, after seeing that the html was outputting the way intended but it wasn't defaulting to 10 (it defaulted to 1) I got really <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> needless to say. My first guess was xhtml compatibility so I changed it to
Didn't work... grrrrrrr
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.
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.