Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-08-2007, 05:00 PM   PM User | #1
homerUK
Regular Coder

 
Join Date: Nov 2002
Location: Manchester, UK
Posts: 533
Thanks: 4
Thanked 1 Time in 1 Post
homerUK is an unknown quantity at this point
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?!
__________________
www.mattfacer.com
homerUK is offline   Reply With Quote
Old 03-09-2007, 02:02 AM   PM User | #2
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
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.
__________________
Helping to build a bigger box. - Adam Matthews

Last edited by Basscyst; 03-09-2007 at 02:16 AM..
Basscyst is offline   Reply With Quote
Old 03-09-2007, 09:22 AM   PM User | #3
homerUK
Regular Coder

 
Join Date: Nov 2002
Location: Manchester, UK
Posts: 533
Thanks: 4
Thanked 1 Time in 1 Post
homerUK is an unknown quantity at this point
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
__________________
www.mattfacer.com
homerUK is offline   Reply With Quote
Old 03-09-2007, 04:37 PM   PM User | #4
david_kw
Senior Coder

 
Join Date: Nov 2006
Posts: 1,000
Thanks: 0
Thanked 0 Times in 0 Posts
david_kw will become famous soon enough
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
david_kw is offline   Reply With Quote
Old 03-11-2007, 04:40 AM   PM User | #5
A1ien51
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
A1ien51 will become famous soon enough
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]
A1ien51 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:05 PM.


Advertisement
Log in to turn off these ads.