Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 5th, 2006, 01:40 PM
Authorized User
 
Join Date: Feb 2004
Location: Nashville, TN, USA.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Querystrings butchered

Thanks in advance to anyone who can help.

When we link to another site, our company requires a gateway disclaimer for any visitor leaving our site -- something to the effect of, "You understand you're leaving, we're not responsible for any of the stuff on this other site, blah, blah, blah..."

Up until now, things have been simple enough. The code was written like this:

<a href="leavesite.asp?link=http://www.anothersite.com">Disclaimer page</a>

Easy enough. But lately, the links that we've had to provide to Other Site have included complex URLs with long querystrings, and the disclaimer page is chopping up the querystring. This link:

<a href="leavesite.asp?link=http://www.wherever.com/index.asp?color=red&tree=maple&car=ferrari">link</a>

...returns this:

http://www.wherever.com/index.asp?color=red

What am I overlooking, and how do I fix it?

__________________________________________________ _____________

Confidence is what you feel when you do not truly understand the situation.
__________________
__________________________________________________ _____________

Confidence is what you feel when you do not truly understand the situation.
  #2 (permalink)  
Old April 5th, 2006, 06:31 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You have two ? in your QS remove the second one, it should look like:

<a href="leavesite.asp?link=http://www.wherever.com/index.asp&color=red&tree=maple&car=ferrari">link</a>

Wind is your friend
Matt
  #3 (permalink)  
Old April 7th, 2006, 08:22 AM
Authorized User
 
Join Date: Mar 2006
Location: Aberdeen, Scotland, United Kingdom.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Matt,

The 1st ? is the start of his QS and the second one is part of the complex link that abq23 is talking about; so the problem remains...

May I humbly suggest:

Store the complex link in the Session Object, like so:

Session("Outside_Link")=strLink

And once inside leaversite.asp; pick it up:

strL = Session("Outside_Link")

Let us know how you finally solve this one!... quite an interesting situation.
Cheers, Joel


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Selects in SQL QueryStrings doonman BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 6 January 30th, 2006 07:01 AM
replacing querystrings with fake page names mase912 C# 0 November 24th, 2004 04:47 AM
querystrings in chapter 8 LL BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 November 19th, 2003 10:36 AM
Querystrings and Redirects hcweb Classic ASP Basics 3 July 30th, 2003 08:50 AM
Querystrings to Variables hcweb Classic ASP Basics 1 June 14th, 2003 06:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.