OK, I've narrowed down the problem. This works when in the aspx page
<script type="text/javascript" >
function btnFirst_Click( )
{
alert("Hello");
alert(document. getElementById( "<%=LBFacilitie s.ClientID%>"). options.length) ;
return false;
}
</script>
But when I put this in a .js file, I get the first "Hello", but the second
statement fails. I've put the
<script type="text/javascript" src="Facilities .js" ></script>
both on top and at the bottom of the aspx page. No luck.
How do I get this to work from a .js file?
Thanks.
--
Matthew.Wells
Matthew.Wells@F irstByte.net
<script type="text/javascript" >
function btnFirst_Click( )
{
alert("Hello");
alert(document. getElementById( "<%=LBFacilitie s.ClientID%>"). options.length) ;
return false;
}
</script>
But when I put this in a .js file, I get the first "Hello", but the second
statement fails. I've put the
<script type="text/javascript" src="Facilities .js" ></script>
both on top and at the bottom of the aspx page. No luck.
How do I get this to work from a .js file?
Thanks.
--
Matthew.Wells
Matthew.Wells@F irstByte.net
Comment