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

      • PrintDriver
        Reply to Silly question about color....
        PrintDriver
        When doing window clings you have to specify
        - white cling or clear cling or frosted cling.
        - applied inside or outside
        - any critical colors as Pantone Solid Coated. The inkjet printer...
        Today, 11:42 AM
      • Samm89
        Reply to Silly question about color....
        Samm89
        Thank you everybody for replying, I really appreciate it. Many of the jobs I work on have incorrect or conflicting instructions when they come down to our studio, and sometimes this causes me to get a...
        Today, 10:45 AM
      • Cosmo
        Reply to Silly question about color....
        Cosmo
        It's being printed with an inkjet so it will use multiple colors of ink to arrive at the PMS color (or as close as possible).

        But specifying it as a PMS color will give the printer a target...
        Today, 10:31 AM
      • Samm89
        Reply to Silly question about color....
        Samm89
        Thanks Ratkins, that's a good point. I have never been instructed to create a white ink and I only ever use Paper, I guess for some reason I was thinking of Paper as overprinting, when of course it knocks...
        Today, 10:29 AM
      • Ratkins
        Reply to Silly question about color....
        Ratkins
        On a window cling it is possible that the white would be white ink. I'd make sure the production manager understands what you want. It's not 4/C, anyway....
        Today, 10:20 AM

      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