Print Page | Close Window

popup box help

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=878
Printed Date: 29 March 2026 at 6:50pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: popup box help
Posted By: Nathan
Subject: popup box help
Date Posted: 10 March 2003 at 1:55am

I am using a popup box to confirm that a form has been processed (send email with link to the page to a friend_, but I want the user to be returned to the original page after they have pressed the OK on the popup box:

 

dim site
site=request.servervariables("http_referer")

response.write "<script>alert('email sent!');location.href='http://www.agni-travel.com'</script>"
response.end

 

I need to change the location.href to reflect the 'site' varaible, but however I add it I get a error or sent off onto a while page!

Thanks for any help you can offer.

Nathan

 




Replies:
Posted By: MorningZ
Date Posted: 10 March 2003 at 6:22am
Originally posted by Nathan Nathan wrote:

I get a error or sent off

and the error is ______________ ?

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Gullanian
Date Posted: 11 March 2003 at 3:59pm

dim site
site=request.servervariables("http_referer")

response.write "<script>alert('email sent!');location.href='"&site&"'</script>"
response.end



Posted By: Nathan
Date Posted: 11 March 2003 at 10:57pm

Gullanian - thanks for your help - that is what I am after. ave tried all sorts of combinations!

Your suggestion:

site=" http://www.agni-travel.com/enquire.htm - http://www.agni-travel.com/enquire.htm "

response.write "<script>alert('email sent!');location.href='&site&'</script>"

response.end

 

Doesn't work though - I get redirected to:

http://www.agni.gr/scripts/email/&site - http://www.agni.gr/scripts/email/&site &

There must be an easy solution!

PS sorry MZ, I was not very clear in defining my problem.

 



Posted By: Bunce
Date Posted: 11 March 2003 at 11:00pm

Thats because you didn't use what Gullanian wrote.

Check your quotes around the &site& variable. Copy EXACTLY what Gullanian had.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: Nathan
Date Posted: 13 March 2003 at 11:13pm

Brilliant,

Thanks Andrew - I am afraid - my eye-sight isn't so good anymore - too many years looking at this bloody screen!

Thanks Gullian for the correct solution.

Cheers - pop by the Taverna anytime for a beer.

Nathan

Corfu, Greece




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net