I have the following link which works fine in everything apart from IE6. In most browsers it takes a value from an adjacent text box and passes that along with the rest of the link to the intended page.
Yeah i'm not an expert in javascript, was told to do the link this way to get it to do what i wanted. Works fine in ie7/firefox/opera. Any tips on what to do to fix it?
I am listening, but the fact it's a problem with my href, doesn't get me any further. I need to get this one fixed quickly, i'm googling it as well as posting here, tried a few things. A pointer will help.
Thanks in advance for any tips.
On a side note , like the "A world without IE" site, superdezign.
Last edited by rsmarsha on Wed Aug 15, 2007 9:19 am, edited 1 time in total.
rsmarsha wrote:I am listening, but the fact it's a problem with my href, doesn't get me any further.
It should. It just means use a different one. Whenever your URL begins with 'javascript:' the browser assumes that anything after it is a JavaScript command. Firefox and IE have different error handling techniques, and I'd bet that IE6 just.. chokes.
The JavaScript command '//' would just be a syntax error. Maybe you want 'javascript:void(0)' or use a regular URL, and just add a 'return false' to the end of your onClick.
rsmarsha wrote:On a side note , like the "A world without IE" site, superdezign.
rsmarsha wrote:That last one has fixed it, thanks VladSun.
Note that if you don't use 'return false,' that the browser will still follow the link, which would likely make you navigate to the top of the page every time you click.
0. Listen to superdezign too
1. In fact, I would never use onclick in an anchor tag in your case - you are overwriting exisitng functionality - the href="javascript:code" param.
There are 10 types of people in this world, those who understand binary and those who don't