Rendering a link in classic ASP and then changing it with jquery
Rendering a link in classic ASP and then changing it with jquery I have a link that i am rendering on page load using an if statement in classic asp, something like the following; // SQL stuff up here <% if not rs.eof then %> <a href="#" class="link" data-mediatype="on" data-id="<%=somevar%>"><i class="fa-star"></i></a> <% else %> <a href="#" class="link" data-mediatype="off" data-id="<%=somevar%>"><i class="fa-star-o"></i></a> <% end if %> I'm also using a jQuery click event to post some of the data to an ajax request, like so; $(document).ready(function(){ $('.link').click(function(e) { e.preventDefault(); var mediatype = $(this).data('mediatype'); var id = $(this).data('id'); $.ajax({ url: '/post/url/here.asp', ...