document referrer with ASP to HTM

L

LCN

Hi
I am trying to restrict a user from direct access to an HTM page. They must
come from a specific ASP page. My initial testing when I go from ASP page to
HTM page there is no document referrer. I am doing a simple test just to see
what is going on and HTM to HTM works fine. But not ASP to HTM.

In the HTM page...

The referrer of this document is:
<script type="text/javascript">
document.write(document.referrer)
</script>

Can this ASP to HTM referrer be done? Do I need to specify parent or
something else??
I'll redirect if the referring page isn't correct.
Thanks so much, I've been stuck on this for a while.

Lori
 
L

LCN

Just to clarify....

I am comming from an ASP page via a redirect command and going to htm page.
I can't read the referrer when it is redirected. Is there some VBscript that
will assist in passing referral info when redirected to HTM?
 
P

p c

I am not sure I understund your question. But it's possible that the way
that rederict is implemnted it is not a referrer--it is loading a new
URL. Referrer means that you were on page 1 and you clicked on a link on
page 1 to jump to page 2--and page 1 is the referrer. Fro exmple if you
go to page 2 by typeing the URL to page directly, the referrer variable
value is empty.

If you want to resricting cange, change the page to ASP then checck for
a prmater passed by the redirect page to confrom that it cme from the
right palce.

...PC
 
L

LCN

Clarification:

page1.asp redirects to page2.htm with vbscript
page2.htm has a javascript if (document.referrer !==
"http://mywebsite.page1.asp") clause..
You are right the redirect seems to treat as if someone just typed in the
URL. It comes into page2.htm empty. Is there antoher command other than
redirect that automatically brings the user to a URL as if it came from
there, or someway to pass a parameter with the redirect so it knows that it
is valid....without changing page2 to asp? It's imperative that it passes
from ASP to HTM. I guess you could say from server to client?

Here's the long version:
I am using PayPal PDT (Payment Data Transfer). It validates the transaction
via vbscript (Which I know don't know much about) forcing me to use ASP.
Upon validation, if it's error I redirect - no problem, if it's successful I
need to go to a FP form (page2.htm). It's a complex form with several file
uploads. FP did a beautiful job on it and it works. FP form will not work
with .ASP (according to my tests and in reading through this forum)
Recreating the form with ASP in VBScript is way way way out of my league.

Thanks for your patientence. You help is apprecitated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top