Our page is "mypage.html" and we are requesting information to complete it from "http://www.myadrotator.com/adrotator.asp" which may be located in the same or in a different site. The information provided by the second file will determinate the ad to be display in our page.
mypage.html
<html>
<title>My page</title>
<body>
<script language="javascript" src="http://www.myadrotator.com/adrotator.asp"></script>
</body>
</html>
<%
if session("ad")="" then
session("ad")=0
end if
if session("ad")=5 then
session("ad")=1
else
session("ad")=session("ad")+1
end if
%>
<% Select Case session("ad") %>
<% case 1 %>
document.write ("<A HREF=http://www.1site.com">)
document.write ("<IMG SCR=1.gif>")
document.write ("</A>")
<% case 2 %>
document.write ("<A HREF=http://www.2site.com">)
document.write ("<IMG SCR=2.gif>")
document.write ("</A>")
<% case 3 %>
document.write ("<A HREF=http://www.3site.com">)
document.write ("<IMG SCR=3.gif>")
document.write ("</A>")
<% case 4 %>
document.write ("<A HREF=http://www.4site.com">)
document.write ("<IMG SCR=4.gif>")
document.write ("</A>")
<% case 5 %>
document.write ("<A HREF=http://www.4site.com">)
document.write ("<IMG SCR=4.gif>")
document.write ("</A>")
<% End select %>