From: Jokke on
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
"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
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