- ASP - Server Variables
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Framed Click Through
Many sites place a frame around an external link from their site. This enables a few things. Firstly, it allows you display a banner ad on a click from your site that you would not normally receive. Secondly, it allows for easy navigation back to your site if the site the person clicked to was not what the person was looking for. is an example (Click here) of a site that utilizes this method. The following example is comprised of three parts. 1. linkto.htm, which contains links to a few websites in the convention necessary for the framed click through to work. 2. frame-click.asp, which will track the page the link was clicked from (the referring page) and the requested and open a frameset and the link being requested. 3. frame-navigation.asp, which writes out a link for the referring page (or home page when none is detected) and a link to remove the frame to view the target link.
View the Output
Text View
Print View
Mail this Link
Download the Code

' Create a variable to note the referring page
' Create a variable for the url of the page the user is clicking to
' If there is no referring page or no link to redirect to
' then send the user elsewhere. This can be another page stating
' that something was missing, here we'll just refer all bad requests to
if previous_page = "" or url ="" then 
response.redirect ""
end if

<title>Link to <%= url %></title>

<frameset frameborder="0" framespacing="0" border="0" rows="90,*">

<!-- Navigation Frame with Banner and Logo 
Note that the referring url and the destination url are passed to the frame
page via querstring --> 
src="frame-navigation.asp?url=<%= url %>&previous_page=<%= previous_page %>

<!-- Content Frame --> 
src="<%= url %>

<!-- No Frames --> 
<body bgcolor="#ffffff">

Your browser does not support frames<br>
Please click <a href="<%= url %>">here</a> to continue to <br>
<%= url %>


' Create a variable for the url being requested
' Create a varible for the page the user clicked from

<body bgcolor="#e8e8e8">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td width="200" valign="top" align="center">
<img src="images/glogo.gif">
<td width="*" valign="top" align="left">
<img src="images/468x60.gif" width="468" height="60">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<td width="550" valign="top" align="left">
<font size="2">
' Check to see if there is a referring page value
' if non is available write a link to your homepage
if previous_page <> "" then %>

<a href="<% response.write previous_page ' write the link to go back %>" target="_top"><b>Go Back</b></a>
<% else ' place a link to your homepage in place of a referrer when not available %>
<a href="" target="_top"><b></b></a>
<% end if %>
<td width="*" valign="top" align="left">
<font size="2">
<a href="<% response.write url ' write the link to remove the frame %>" target="_top"><b>Remove Frame</b>

<title>Link To</title>
<body bgcolor="#FFFFFF">
Click on any link to open the site<br>
within a frame with a logo and banner<br><br>

<a href="frame-click.asp?url=">Yahoo</a>
<a href="frame-click.asp?url=">SAS</a>
<a href="frame-click.asp?url=">ASPin</a>
<a href="frame-click.asp?url=">Excite</a>
<a href="frame-click.asp?url=">Lycos</a>
<a href="frame-click.asp?url=">Google</a>
<a href="frame-click.asp?url="></a>




ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3