Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: window.open causing problem with URLencoded querystring


Message #1 by "Gianpiero Colagiacomo" <gp@1...> on Sun, 19 Jan 2003 02:24:34 +0100
I posted yesterday asking how to urldecode a querystring in ASP/Javascript.

It appears the problem is nothing to do with needing to decode the string.
Rather the Javascript function window.open is causing some unforeseen
problem:

javascript:window.open('http://localhost/jacinta/htdocs/jgcollection_list_su
bcat.asp?ProductCat=Glassware&ProductSubCat=Champagne%20%26%20Toasting%20Flu
tes');

If the ASP page is opened without using window.open it works fine.  Why
would the window.open function cause the data to be treated differently?

Cheers,

GP


Message #2 by "Ken Schaefer" <ken@a...> on Mon, 20 Jan 2003 14:05:01 +1100
What is the problem?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Gianpiero Colagiacomo" <gp@1...>
Subject: [access_asp] window.open causing problem with URLencoded
querystring


: I posted yesterday asking how to urldecode a querystring in
ASP/Javascript.
:
: It appears the problem is nothing to do with needing to decode the string.
: Rather the Javascript function window.open is causing some unforeseen
: problem:
:
:
javascript:window.open('http://localhost/jacinta/htdocs/jgcollection_list_su
:
bcat.asp?ProductCat=Glassware&ProductSubCat=Champagne%20%26%20Toasting%20Flu
: tes');
:
: If the ASP page is opened without using window.open it works fine.  Why
: would the window.open function cause the data to be treated differently?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #3 by "Gianpiero Colagiacomo" <gp@1...> on Tue, 21 Jan 2003 01:46:50 +0100
Sorry Ken,  I guess I you didn't see my original post.  Basically the
problem is that when I use window.open to open the asp page and there
happens to be a special character in one of the querystrings posted (used as
a filter on a recordset for an access db), in the case I'm trying to resolve
an &, it causes no records to be found.  If I open the page conventionally
it finds the relevant records.

The page in question is available online and if you use the links below
you'll see what I mean:

Not working:

javascript:window.open('http://www.1lg.com/portfolio/jacinta/htdocs/jgcollec
tion_list_subcat.asp?ProductCat=Glassware&ProductSubCat=Champagne+%26+Toasti
ng+Flutes');

Working:

http://www.1lg.com/portfolio/jacinta/htdocs/jgcollection_list_subcat.asp?Pro
ductCat=Glassware&ProductSubCat=Champagne+%26+Toasting+Flutes

Why does window.open cause the data to be treated differently?

Cheers,

GP



  Return to Index