Hi, W3C warns against variable names in URLs that could be interpreted as html entities, like:
<A HREF="script.php?var=my_var&=my_amp">
as & might be replaced by forgiving browsers (those that do not require html entities to end with ;) with & resulting in the URL looking like:
script.php?var=my_var&=my_amp
So it is recommended to write such an anchor this way:
<A HREF="script.php?var=my_var&amp=my_amp">
Having said that, what about the following:
<A HREF="javascript:window.open('script.php?var=my_var&=my_amp', '', 'width=500,height=250')">
I would assume that as soon as browsers see javascript: in the HREF attribute, the javascript interpreter would take over and just '&' is ok. I tried both '&' and '&' and both work equally well (in IE at least).
So well it's cool it works, but I'd like to understand what's actually going on and who's at the controls, html or javascript?
Any experience with that?
Thanks!
Cheers,
Cook