Forum Moderators: open
<a href="file.asp?View=2&ID=678">News ID 678</a>
Now, this works in all browsers but Mozilla (don't know about Netscape 6/7, but I guess this won't work in these either).
The page does validate, and the link even works in Netscape 4... So what does the Gecko-engine not like about it? Any ideas?
It used to not work at home too, but surprisingly now it does. It seems that I have different settings in Mozilla at home and at the office which trigger the problem or then it might even be a proxy-related problem, because in my office I am behind a proxy.
It still seems kind of weird to me, because the problem only occurs in Mozilla, not in any other browser.
Funny enough, that solved the problem in Mozilla. Well, takagi thought it is "unrelated", but it seems that it somehow was related.
Thanks to all who tried to help and two thumbs up for takagi! :)
A URL should be build like this
<protocol>//<host>[:<port>]/<pathname>[<hash>][<search>]
For example [mydomain.com...]
<protocol> = "http:"
<host> = "www.mydomain.com"
<pathname> = "widgets/faq.asp"
<search> = "?item=3&t=2"
Having an extra question mark in the search like
<search> = "?view=2&?=128"
is rather unusual. I strongly advice DrOliver to look for another sequence to avoid future problems.
The browser will send the correct unescaped version to the server, and the display will be rendered correctly (unless there is a bug in the browser).
Typing a link into the browser address bar with & in it usually does not work (just in case anyone is tempted to try it).
Having question marks in the query component of a URI is not a problem at all. RFC2396 - Uniform Resource Identifiers (URI): Generic Syntax [faqs.org] defines query as *(reserved ¦ unreserved ¦ escaped) where reserved characters are: ";" ¦ "/" ¦ "?" ¦ ":" ¦ "@" ¦ "&" ¦ "=" ¦ "+" ¦ "$" ¦ ",". The first question mark will delimit the query component. In the query string all uri characters (reserved ¦ unreserved ¦ escaped) are allowed.
Andreas
Well, I took the site in question over from somebody else, so until I saw a little more behind it I just could not see that it was that simple. So I am going to change the error message to something more understandable, and that's it.
But I've lerned a thing or two now. I hope somebody else has taken same advantage from this thread. Cheers :)