I have a Colorbox that opens on a page after the document finishes loading. The problem is I only want it to load if someone has clicked through from a link. I would do this in PHP with form POST or GET variables but the site is built in ASP and it’s a framework that I can’t alter from an e-commerce site.
I tried to see if there was an equivalent to if isset($_POST) in ASP but there doesn’t seem to be one. Is there a way to do this in ASP?
<% IF (Request.Form("clicked")="clicked") %>
<script>
jQuery(document).ready(function(){
jQuery.colorbox({
iframe : true,
innerWidth : 430,
innerHeight : 208,
href : "/v/browse_market.asp"
});
});
</script>
<%ELSE%>
<%END IF%>
Is this close? I have a form on another page that submits a hidden post variable with the name=”clicked” and the value=”clicked” to this page. It still seems to be showing always (whether I click through or not).
IF (request.form("element") <> "") THENis the proper way in asp (classic)if(Request.Form["element"] <> "")is the proper way in ASP.NET