ASP.NET - Trying to output variable into jQuery -


i trying grab value of callid, if defined within url , set checked box (this id of <input type="checkbox" />). if defined, should check box default.

here's i'm using, getting error on page:

<% dim callid callid = request.querystring("callid") if callid <> "" %> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script>     $(document).ready(function(){         $("#<% callid %>").prop('checked', true);     }); </script> <% end if %> 

the error points bit: $("#<% callid %>") saying callid not expression.

how set callid value inside of jquery tag?

try -

 $("#<%= callid %>").prop('checked', true); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -