Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 MOD DEV : Interrupt ad page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

indianBoy
New Member

56 Posts

Posted - 02 July 2004 :  17:52:31  Show Profile  Visit indianBoy's Homepage  Send indianBoy an AOL message  Send indianBoy an ICQ Message  Send indianBoy a Yahoo! Message
I am trying to integearte a functionality in the snitz forums where a page will be displayed, interrupting users. the page will display ads, or some other information. lets not go into ethhics regarding this. this is would definetly prove very useful. the page will have a link saying, 'continue to the message'. Much like the yahoo mail.

i have included this code in inc_header.asp:


<%
function IsPrime(ByRef pLngNumber)
    	Dim lLngSquare
    	Dim lLngIndex
    	IsPrime = False
    if pLngNumber < 2 Then Exit function
    if pLngNumber Mod 2 = 0 Then Exit function
    lLngSquare = Sqr(pLngNumber)
    For lLngIndex = 3 To lLngSquare Step 2
    if pLngNumber Mod lLngIndex = 0 Then Exit function
    Next
    	IsPrime = True
    End function



Dim maxNo 
maxNo = 700
Randomize
num = Int(Rnd * maxNo)+1
if(IsPrime(num)) then


Response.Redirect("advert.asp")
'Response.End()
end if
%>



what the above code is doing is just, randomly displat a page ( advert.asp ) based on whether a number is a prime or not ( better algorithms can be developed later, and will use cookies too)


now the advert page has this :


<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" valign="middle"><a href="<%=Request.ServerVariables("HTTP_REFERER")%>">Continue to Message</a> </td>
  </tr>
</table>


which is simply displaying the message with the HTTP_referrer in ASP.

now the problem is that the link in the advert page does not contain the link that was clicked and that the user was supposed to go to.

according to my logic :

1.user clicks page link to B.asp on page A.asp
2.page B.asp gets processed in the server ( does not get thrown to the browser ?)
3.since B.asp never shows up in the browser, the referrer is officially A.asp.

But i want B.asp.

how should i get the complete URL to B.asp inm advert.asp

lets complete this step then we can go further




instead it has
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07