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

      Sponsor

      Collapse

      Incredible Stock

      Latest Topics

      Collapse

      • ampeddesign
        Reply to Logo Critique Please
        ampeddesign
        Thanks for the feedback guys. I am worried that the E is not obvious enough. Do you think that's the case? Or do you think maybe it doesn't matter so much?
        Yesterday, 10:16 PM
      • SophieMDesigner
        Good morrow! I was wondering if you guys could give me some advice in this logo?
        SophieMDesigner
        Hi GDF Peeps!

        My name is Sophie M O'Connell I live in Sunny Devon in the UK and I was recently made redundant from a local newspaper/ad agency. Turns out this isn't such a bad thing though......
        Yesterday, 08:02 PM
      • Mojo
        Reply to Questions about Pitching to New Client
        Mojo
        I wouldn't show sketches. You're demonstrating your propensity to give away your work for free, without any sort of contract or agreement to terms. It's a bad precedent and it makes it more likely in...
        Yesterday, 12:44 PM
      • B
        Reply to Logo Critique Please
        B
        It took me a few seconds, but instead of AMP D, it says AMPED. It's clever making an electrical plug from the E and D. The abbreviation "amp' has a bunch of definitions, like amplifier or ampere....
        Yesterday, 12:25 PM
      • B
        Reply to Questions about Pitching to New Client
        B
        It's been my experience that when clients see rough sketches, they are typically unable to envision a sketch becoming a finished product. They also see it as unfinished and seem to feel an urge to want...
        Yesterday, 12:06 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