Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink to map website causes invalid code

Status
Not open for further replies.

ClulessChris

IS-IT--Management
Jan 27, 2003
890
GB
I use the folowing link in my code to link to a map refence on multimap.com
However as the link has unencoded amperstands it causes the page to fail validation. If I encode the amersands the link doesn't work.
can I get the link to work and the page code to validate?


Code:
<p><a href="[URL unfurl="true"]http://www.multimap.com/maps/?hloc=GB|CF44[/URL] 9DE#t=l&map=51.73027,-3.48301|15|4&loc=GB:51.73027:-3.48301:15|CF44 9DE|CF44 9DE"
[/code/

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
You have an unencoded space in there, as you can see from the URL in your original post.

Lee
 
trollacious,
thanks for your reply. yes I also have unencoded spaces in there. but if I encode them as below, the link doesn't open with the correct location in the map.

Code:
<a href="[URL unfurl="true"]http://www.multimap.com/maps/?hloc=GB|CF44%209DE#t=l%26map=51.73027,-3.48301|15|4%26loc=GB:51.73027:-3.48301:15|CF44%209DE|CF44%209DE"[/URL]	target="_blank">Multimap Directions</a>

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
You're also encoding valid ampersands, the ones right before loc and map. Try encoding the values of the elements before building the URL.

Lee
 
The # char might cause a problem since it means that it points to an anchor on the target page/URL..

- Lowet

[gray]Why can't all browsers parse pages the same way? It should be the Web designer who decides how to display the content, not the browser![/gray]
 
Many thanks all but the issue in now resolved with the encoded URL in my last post.

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top