Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Manchester, UK
    Posts
    533
    Thanks
    4
    Thanked 1 Time in 1 Post

    prototype IE issues

    Hey guys,

    I've started to update existing applications with some ajax stuff using Prototype... it's been fine working in IE and Firefox - but just recently IE has started acting up a little.

    Here's some basic coding I'm using..

    Code:
    var url = 'files/query_something.php';
    var pars = Form.serialize($('form_data'));
    var success = function(t){ alert("all ok"); }
    var error = function(t) { alert("ERROR"); }
    var myAjax = new Ajax.Request(url, {method: 'post', parameters: pars, onFailure: error, onSuccess:success });
    it all works 100% a-ok in firefox, but Internet explorer is hit and miss! It works sometimes, then othertimes just submits and nothing comes back.

    any ideas what I can do??
    Maybe add some debugging... ? has anyone else had this problem?!

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Perhaps try appending the current date/time to the parameters sent in the request. This will ensure that IE will pick up the fact that it is a new request, often times if the same parameters are passed multiple times, IE caches it somehow, somewhere and stops getting new data.

    Not sure if that's your problem, but worth a shot.

    Here is an example, make note of the code at the very end:
    http://www.codingforums.com/showthread.php?t=109331#4

    I'm going to move this to the new Ajax forum.
    Last edited by Basscyst; 03-09-2007 at 02:16 AM.
    Helping to build a bigger box. - Adam Matthews

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Manchester, UK
    Posts
    533
    Thanks
    4
    Thanked 1 Time in 1 Post
    ok cool thanks - I'll give that a shot. So prototype is ok to go forward using? Or would you recommend using my own request code, or something like you posted in the other thread?

    Cheers

  • #4
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I was doing research on javascript libraries, Prototype had by far the highest number of users so I suspect they are doing things fine. I'm actually going to start using it in the next month so I sure hope I'm right. :)

    As for the problem, it could be caching although it is an odd symptom unless there are times when the ajax request is supposed to return nothing. So when you say it is returning nothing, what alert message is it giving? Success? Error? No alert? I suspect more debugging is in order.

    david_kw

  • #5
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    I really suggest getting http://www.amazon.com/Prototype-Scri.../dp/1933988037 when it is released.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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