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, 10: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

      • KitchWitch
        Reply to Hello!
        KitchWitch
        Hi Fernandes44 and welcome to GDF.

        We ask all new members to read very important links here and here. These explain the rules, how the forum runs and a few inside jokes. No, you haven't...
        Today, 10:47 AM
      • Fernandes44
        Hello!
        Fernandes44
        Hello,

        I am new member into this community. I would like to introduce myself with all of you guys. Hope you will accept me guys.

        Thanks for your time!...
        Today, 10:23 AM
      • murofwoh
        Reply to Ice Cream Sign Design - First Trial
        murofwoh
        and break out the sketch pad----20 thumbnails first!
        Today, 10:11 AM
      • murofwoh
        Reply to My first thread design
        murofwoh
        already mentioned but SANPSTER? Don't you mean S N A P ster? if you can't get that right, well.....I mean my brother is an actual dyslexic and ran his own sign shop for years---talk about some scary and...
        Today, 10:09 AM
      • seamas
        Reply to Ice Cream Sign Design - First Trial
        seamas
        Both of these suffer from the same things.

        1. Boring photos.
        2. The presentation tells me that this is most certainly NOT gonna be better than ice cream.

        You need to sell...
        Today, 10:05 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