Re: eregi_relace() and HTML <map>

From: Date: Tue, 20 Jun 2000 21:44:49 +0000
Subject: Re: eregi_relace() and HTML <map>
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2369@lists.php.net to get a copy of this message
In article <020a01bfd6e9$d52ec780$0a00000a@nexen.net>, pbalthazar@nexen.net ("Pierre BALTHAZAR") wrote: > My problem now : > When I open a browser ( and only when I open it for the first time ) the > source is transformed and > '?MySession=9e76ffcd24c8fa57f5e8f1096a1493e9"#" coords="55,65,86,78" > shape="rect........' appears a couple of times on source and on the page. > > I really don't know where can it come from. > > If someone's got an answer, it should be welcome. HREF="#" is a "hack" by graphics packages to give a URL that goes nowhere -- just back to the same page. The browser will replace it with HREF="currentpage.htm#" and the # just links to a non-existent anchor (like "longpage.htm#section1" only there ain't no section1), and everybody's happy. Now PHP is coming along and inserting the Session stuff between the URL and the #. Only problem is, it's not coming after the ", but before it, which seems pretty wrong to me... At any rate, you're going to have to replace those "#"s with something real if you expect the links to go somewhere useful, and when you do, hopefully PHP's session stuff will end up in the right place... Meanwhile, try taking out the "#" and just use # instead. The quotes are probably optional on most browsers (never mind the spec, I'm talking reality here) and it might work to have just # there. Or maybe you got the ereg wrong to insert the PHP ID in there... You need to allow for an optional quote after HREF= but before the base URL, and any #xxxx needs to come at the *END*, before the closing ", if there is one, but not before any ?ID=adsfasfdadsf&foo=3 stuff: HREF="whatever.php3?MySession=asdfasdfadsf&foo=1#section1" > (*) = <img height="88" width="168" src="img/t1menu.gif" > border="0" > usemap="#logomenuXXX137e3c13"><map > name="logomenuXXX137e3c13"><area href="#" > coords="55,65,86,78" shape="rect"><area href="#" > coords="52,49,95,62" > shape="rect"><area href="#" coords="28,34,109,47" > shape="rect"><area > href="#" coords="37,15,127,28" > shape="rect"></map></td> -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#2369) next »