SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 77 of 77
  1. #76
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,049
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by Forbes View Post
    It worked straight away with no problems.
    Yay!

    You won't believe what the error was.
    It was being caused by this line console.log("here"); in the following function:

    Code JavaScript:
    $("#button").click(function(ev) {
      console.log("here");
      s = $("#post_code").val();
      e = $('input[name=venue_id]:checked').attr('data-postcode')
      ev.preventDefault();
      $.fancybox(this, {
        ajax: {
          type : "POST",
          data : 's=' + s + '&e=' + e
        },
        onComplete: function(){
          initialize();
        }
      });
    });

    Just remove it and you're good.

    I think that has got to be the biggest face-palm moment of this year so far.

    It's common knowledge that console.log is bad news for IE, but until I spotted this, I was testing on three different machines and had to result to setting up a VM, just to be able to reproduce the error.

  2. #77
    It's been real... Forbes's Avatar
    Join Date
    Dec 2004
    Location
    Yorkshire, England
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, I've done similar countless times. As we know, Fancy Box is working fine elsewhere, so it had to be something in the JavaScript itself. I was attempting a code comparison, but the two documents were too different to work, or I may have dug that one out.

    Anyway, this looks to have got things working, which is excellent.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •