Clicking a link results in blank page with "true" in IE7
May 10, 2011
Internet Explorer | Javascript | Troubleshooting | Web Building

If clicking on a link containing a javascript results in a white page contining nothing but the word "true" or "false", check the link to see if it is written in the form:

<a href="javascript:yourfunction();">link text</a>

Ads by Google

Posted by ellen at May 10, 2011 09:06 AM

If so, try rewriting it in the form:

<a href="#" onclick="yourfunction();">link text</a>

Certain browsers, particularly IE, will show the return value of the function rather than executing it under certain conditions. I've found this issue when using swfObject to write a Captivate swf to the page like this:

<a href="javascript:so.write("CaptivateContent")">Click to show movie</a>
results in blank page containing "true" in IE7. Using the onclick statement fixes the problem.


Ads by Google


Ads by Google

 RSS   |   Contact Me


Ads by Google