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
Post a Comment