Announcement

Collapse
No announcement yet.

IE8/jQuery Not Playing Ball

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IE8/jQuery Not Playing Ball

    Code:
    $("#submitButton").click(function(){
      $.post("/dosomething.php",
             {action:"go",email:$("#email").val()},
             function(html){ alert(html); },
             "html");
      return false;
    })
    The 'dosomething.php' script returns '1' on success, or an error message on failure (for example, 'Invalid email address'.) However when the script is going to return '1' (ie. it succeeds) IE8 ignores the 'return false;' line and sends the visitor to the script directly... any ideas why this would be? Doesn't happen in anything else I've tested

  • #2
    The only help I can offer is that you should be using the .submit() function on the form element, not a click function on the submit button.

    http://docs.jquery.com/Events/submit

    Other than that, I'm not really sure what you're doing. Why validate the form with PHP?

    There are loads of jQuery validation plugins (scripts) out there.
    Last edited by vanishdesign; 09-15-2009, 09:58 AM.
    Swedish Meatball Pornography

    Comment


    • #3
      Dah, sometimes I really should RTFM. That fixed the issue, all works perfectly now, thanks a lot

      (And I'm using PHP for compatibility; I'll add some pretty client-side validation later...)

      Comment

      Search

      Collapse

      Advertisement

      Collapse

      Latest Topics

      Collapse

      • Craig B
        Reply to Monthly fee for Adobe???
        Craig B
        I believe (not sure) that you might still be able to outright buy CS6 directly from Adobe, but you had to physically call them and process it somehow over the phone (and they may discourage you every...
        Today, 08:02 PM
      • JofDiamonds
        Comment on Playing Cards
        JofDiamonds
        Thank you, I'm glad you like them.

        I am considering using a different color for the portrait and the background, but I'm not sure yet how to manage it.
        Today, 06:52 PM
      • JofDiamonds
        Comment on Playing Cards
        JofDiamonds
        These will be produced on an offset printer with a spot resolution of 1200 lpi. The plan is one spot color on each card, with no tints.
        Today, 06:49 PM
      • JofDiamonds
        Reply to Playing Cards
        JofDiamonds
        I decided to give this a go. I think I prefer the original pattern, but the results are here for you to decide for yourself.
        ...
        Today, 06:45 PM
      • PrintDriver
        Reply to Monthly fee for Adobe???
        PrintDriver
        Unless you find a CS6 the answer would by no. You are at the mercy of your subscription to Adobe.
        Also no telling how much longer they will support CS6.

        The fee still works out to about...
        Today, 05:59 PM

      GDF A division of Mediabistro Holdings Adweek | Mediabistro | Clio | Film Expo Group Contact Us | Terms of Use | Privacy Policy Copyright 2016 Mediabistro Holdings
      Working...
      X