electricphp
Programmer
ok, I'm not sure if I should be posting this here or in the asp forum but here it goes.
What I'm trying to do is pass the referrer of an html page to an asp page for processing. The way I'm doing this is:
There are 2 problems. the first is that the function is not invoked, it simply passes javascript:getref() instead of the output of the function.
The second problem is that even if it passed the actual URL, the characters in the url such as & ? etc., would mess up the post variable. I would need the referring url to be passed in quotes or something.
On the asp page it simply gets inserted in the database as a post value.
I hope this makes sense
What I'm trying to do is pass the referrer of an html page to an asp page for processing. The way I'm doing this is:
Code:
function getref(){
if (document.referrer&&document.referrer!="")
document.write('<img src="[URL unfurl="true"]http://www.designerwebs.us/access-log.asp?pg=contact.html?ref="'+document.referrer+'>');}[/URL]
<img src="[URL unfurl="true"]http://www.designerwebs.us/access-log.asp?pg=contact.html&ref=javascript:getref()"[/URL] border="0">
There are 2 problems. the first is that the function is not invoked, it simply passes javascript:getref() instead of the output of the function.
The second problem is that even if it passed the actual URL, the characters in the url such as & ? etc., would mess up the post variable. I would need the referring url to be passed in quotes or something.
On the asp page it simply gets inserted in the database as a post value.
I hope this makes sense