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

      • hectorclark
        Reply to two posters
        hectorclark
        Hey, It's really creative works. Best wishes for you. Carry on....
        Yesterday, 01:05 PM
      • hectorclark
        Comment on Ice Cream Sign Design - First Trial
        hectorclark
        This is nice but If it's background will be white then it's looks more attractive I think.
        Yesterday, 01:01 PM
      • EC
        Reply to two posters
        EC
        Hi!

        I like the second image -- but I'd get rid of her ear, it's not necessary and kind of distracting. And I'd pull the green overlay all the way up, her hairline at the top also draws the...
        Yesterday, 12:14 PM
      • PrintDriver
        Reply to two posters
        PrintDriver
        What are the intended messages of the posters?
        Graphic design is all about the message. Most graphic designers are able (or should be able) to montage images as shown here. The skill is in conveying...
        Yesterday, 10:51 AM
      • i3z
        two posters
        i3z
        hi , Im new member here
        I designed two posters and I hope u give feedback to improve my design
        first poster

        I used the pics on below picture

        the second poster...
        Yesterday, 10:25 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