Prev: stationary header and footer in modalpopupextender
Next: How do i keep WebForm_DoPostBackWithOptions from rendering to page for Imagebutton?
From: Jokke on 15 Apr 2010 06:53 Hi, my code: .... <script type="text/javascript"> var myfilter = myJSfunction(document.myform.ListBox1); </script> </form> When compiling the web page, because of the master/content, the Listbox1 control gets a different name/id apparantly. So how can I pass my listbox on as an argument of my JS procedure? thx for helping, J
From: Mark Rae [MVP] on 15 Apr 2010 08:47 "Jokke" <Jokke007007(a)hotmail.com> wrote in message news:7839C9C3-037F-4550-B5BC-E6BA75D93A99(a)microsoft.com... > When compiling the web page, because of the master/content, the Listbox1 > control gets a different name/id apparantly. That's correct. It's called ID munging and is totally standard behaviour. > So how can I pass my listbox on as an argument of my JS procedure? var myfilter = myJSfunction(document.getElementById('<%=ListBox1.ClientID%>')); -- Mark Rae ASP.NET MVP http://www.markrae.net
From: Jokke on 15 Apr 2010 09:58
Works like a dream and thx very much! "Mark Rae [MVP]" <mark(a)markrae.net> wrote in message news:%23JseQpJ3KHA.348(a)TK2MSFTNGP04.phx.gbl... > "Jokke" <Jokke007007(a)hotmail.com> wrote in message > news:7839C9C3-037F-4550-B5BC-E6BA75D93A99(a)microsoft.com... > >> When compiling the web page, because of the master/content, the Listbox1 >> control gets a different name/id apparantly. > > That's correct. It's called ID munging and is totally standard behaviour. > > >> So how can I pass my listbox on as an argument of my JS procedure? > > var myfilter = > myJSfunction(document.getElementById('<%=ListBox1.ClientID%>')); > > > > -- > Mark Rae > ASP.NET MVP > http://www.markrae.net |