Windows Dev Center

Javascript on onclick of hyperlink is not working in IE7 & IE8 which was working before


  • Javascript on onclick of hyperlink is not working in IE7 & IE8, which was working before


    Following html code was working in IE7 & I8 few months before. but now it's not working in IE7 & I8

    <a  href="#" onclick="Javascript:CloseDisableScreen();ClosePopupContainer('deleteRouteConfirmationPopupWindow');DeleteRoute(document.getElementById('preferenceIdToDeleteRoute').innerHTML, document.getElementById('routeNameToDelete').innerHTML);">

    What's the wrong with above code? it has to do with code or with updates of IE browsers? Do I need to update IE7  & IE8.

    Thursday, June 30, 2011 5:22 PM


  • Hi,

    It looks like you are missing : in your onclick statement.

    Do you have a link to your site or a test page that demonstrates the issue?

    Have you checked the Developer Tool console for scripting errors... In IE8... Tools>Internet Options, Advanced tab, check "Display notification about every script error"


    try adding return false; to your onclick statement.


    Friday, July 01, 2011 3:54 AM