[mapserver-users] Problem with Netscape treating a space different than Internet Explorer
Brian Fischer
bfischer at mpls.houstoneng.com
Thu Sep 13 06:44:41 PDT 2001
Thanks Regina. Your suggestion worked great. It now works in both
Explorer and Netscape. I already had the URL in a JavaScript function,
so all I had to do is add the escape function.
function printmap() {
OpenPrintWin =
this.open("http://www.houstoneng.com/mapserv/cgi-bin/mapserv.exe?&map=[m
ap]&template=printmap.html&layers=" + escape('[layers]') +
"&mapext=[minx]+[miny]+[maxx]+[maxy]", "PrintWindow",
"toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}
Tom, I did not try your suggestion but I'm sure it would of worked also.
It was the same concept as Regina's suggestion.
Thanks again to everyone,
Brian
-----Original Message-----
From: Obe, Regina DND\MIS [mailto:Regina.Obe.PFD at ci.boston.ma.us]
Sent: Thursday, September 13, 2001 7:41 AM
To: Brian Fischer; 'mapserver-users at lists.gis.umn.edu'
Subject: RE: [mapserver-users] Problem with Netscape treating a space
different than Internet Explorer
You have to URL Encode the layers section. IE does an implicit URL
Encode
when it sees spaces in a URL tag whereas Netscape doesn't.
Try this line in place of your URL
<SCRIPT language=javascript>document.writeln("<A
HREF=\"http://www.houstoneng.com/mapserv/cgi-bin/mapserv.exe?&map=[map]&
temp
late=printmap.html&layers=" + escape('[layers]') +
"&mapext=[minx]+[miny]+[maxx]+[maxy]\">The Hyperlink label goes
here</A>")</SCRIPT>
I don't have a netscape browser handy at the moment so couldn't test it.
-----Original Message-----
From: Brian Fischer [mailto:bfischer at mpls.houstoneng.com]
Sent: Wednesday, September 12, 2001 5:44 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] Problem with Netscape treating a space
different
than Internet Explorer
Mapserver community,
I was wondering if anyone else has had this problem. I assume there
must be
a way around it, but can't find a solution.
Here is the problem: I am using the [layers] cgi variable in a hyperlink
like shown below.
http://www.houstoneng.com/mapserv/cgi-bin/mapserv.exe?&map=[map]&templat
e=pr
intmap.html&layers=[layers]&mapext=[minx]+[miny]+[maxx]+[maxy]
The problem is Netscape does not replace the space with a %20, but
Internet
Explorer does.
Internet Explorer 5.5 URL:
http://www.houstoneng.com/mapserv/cgi-bin/mapserv.exe?&map=projects/fgdc
/map
viewer/mapviewer.map&template=printmap.html&layers=lakes%20Rivers%20Road
s&ma
pext=-100.092035+47.222059+-94.531453+51.668504
Netscape 4.7 URL:
http://www.houstoneng.com/mapserv/cgi-bin/mapserv.exe?&map=projects/fgdc
/map
viewer/mapviewer.map&template=printmap.html&layers=lakes Rivers
Roads&mapext=-96.766990+48.008085+-95.278996+49.197928
Any suggestions would be greatly appreciated.
Thanks,
Brian
More information about the MapServer-users
mailing list