Results 1 to 3 of 3

Thread: Another IE8 problem - onclick

  1. #1
    Join Date
    Jun 2010

    Another IE8 problem - onclick

    I have used the following pre-deletion confirmation code on my sites for ages.

    <input type="button" class="btn" value="Clear Order" onclick="if (confirm('Delete Order?')) {location.href='somepage.php';}"/>
    Just recently it appears that some IE8 browsers are essentially ignoring the conditional check and charging on to the target link rergardless!

    There seems to be considerable chatter on the forums about IE8 javascript handling but nothing definitive on this common piece of code.

    Any clues?

  2. #2
    Join Date
    Feb 2006
    I never heard of it, and I can't duplicate it.

    I don't use inline code, but I put it on a page to test in IE8.

    It navigates to the href url when you confirm 'OK' and does not when you click 'cancel', as you would expect.

    I tested on a localhost server, so pages run with the http: protocol and not file:c, if that makes a difference.
    Last edited by mrhoo; 06-10-2010 at 07:17 PM.

  3. #3
    Join Date
    Jun 2010
    Thanks for the reply - I should have been more explicit.

    I too can't replicate the error but it has happened to at least 2 other clients and the only apparent common denominator of any significance I can find is they are on IE8 (javascript enable!).

    My research into the issue suggests IE8 is exhibiting various behavioural differences from past versions and a couple of posts on other forums describe similar prtoblems but with no solutions being offered yet - ergo my assumption that this is likely an IE8 scenario.

    Could it be a mix of other browser settings preventing the usual behaviour of the code?

    Any other comments would be appreciated.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center