Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
[deleted comment]
This is not specific to asmSelect as far as I can tell. I removed asmSelect
completely from your example (sample_js.htm), so that it was just a plain HTML
document without JS or CSS, and the behavior is the same in Firefox.
I am assuming that you can't dynamically write options in Firefox with
document.write(). I am also wondering why the document.write() is being used,
as it
seems unnecessary? As you'd indicated, your actual usage is more complex, so I'm
assuming there is a reason why you need to output these with JS. If that is the
case,
these likely need to be done inside a $(document).ready() function, and
appended in
the select, regardless of whether you use asmSelect or not.
Thanks,
Ryan
Original comment by ryancram...@gmail.com
on 21 Feb 2009 at 4:00
Opps, looks like I inadvertently deleted my followup comment.....but here it is
again....
After doing some more research, I've found the problem...the order that
document.write is executed relative to other code causes it to reset the page
(at
least for FireFox). And since all it does is write the select list text, that
is all
I got. I've changed it to use the DOM and it now works correctly in all 4
tested
browsers.
As an aside, the reason I'm using JS to generate the lists is that the lists
can be
fairly large, hundreds of options (upto about 20k-30k of content), and I send
the
data in a seperate request so the browser can cache it and use it on several
subsequent pages. In fact, the same data can be used generate up to 5 different
selects.....so you can see the advantage of depending on the browser cache to
improve performance.
Original comment by cbrust...@gmail.com
on 21 Feb 2009 at 6:10
Original issue reported on code.google.com by
cbrust...@gmail.com
on 8 Jan 2009 at 10:35Attachments: