Re: [jQuery] Newbie Alert: Problem with Ajax

2007-02-27 Thread Edwin Martin
Matias Oberg wrote:
 Could this be it and are there any ways to avoid it?
   
  success: function(txt){$(#show_'. $catid 
 .').append(txt);}
 

Look at the contents of the string  #show_'. $catid .'. I don't think 
you want to use this as a selector.

I guess you want to paste in the value of a PHP-variable, so your 
problem is in your PHP-code.

Edwin Martin



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Newbie Alert: Problem with Ajax

2007-02-27 Thread Matias Oberg

Thanks Edwin,

it still don't think it's my PHP that's causing the problems.
The code is inside a php-script so all variables gets replaced at runtime.
But replacing the phpvariables with hardcoded values causes the same
problem.

$(document).ready(function(){
 $(a#cat_1).click(function(){
$(#ajaxloadimage).ajaxStart(function(){
$(this).show();
});
$.ajax({
type: POST,
processData: true,
dataType: html,
url: getallfromcategory.php,
data: uid='. $cat_result['uid'] .',
success: function(txt){$(#show_cat_1).append(txt);}
});
$(#ajaxloadimage).ajaxStop(function(){
$(this).hide();
});
$(#show_cat_1).ajaxSuccess(function(){
$(this).slideDown(slow);
});
});
});

Are there any limitations on how much data Firefox can handle when updating
via JS? Do I have to divide the data into smaller chunks?

Thanks!

- Matias Oberg



Edwin Martin wrote:
 
 Matias Oberg wrote:
 Could this be it and are there any ways to avoid it?
   
 success: function(txt){$(#show_'. $catid 
 .').append(txt);}
 
 
 Look at the contents of the string  #show_'. $catid .'. I don't think 
 you want to use this as a selector.
 
 I guess you want to paste in the value of a PHP-variable, so your 
 problem is in your PHP-code.
 
 Edwin Martin
 

-- 
View this message in context: 
http://www.nabble.com/Newbie-Alert%3A-Problem-with-Ajax-tf3290902.html#a9179029
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Newbie Alert: Problem with Ajax

2007-02-27 Thread Matias Oberg

Think I've found the solution myself.

In the return data from my phpscript I have a couple of javascripts.
I placed this in the wrong section of the phpfile which caused the
javascript to be written over and over again.

The sample script was this.
script
var alertme = function(){alert(Whatever);}
/script

My guess is that Firefox triggers when the same variable gets set over and
over again and IE just ignors it.

When I move the javascript so it just gets written just once everything
works like it should even in Firefox.

Thanks!

- Matias Oberg

-- 
View this message in context: 
http://www.nabble.com/Newbie-Alert%3A-Problem-with-Ajax-tf3290902.html#a9179266
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Newbie Alert: Problem with Ajax

2007-02-26 Thread qsec

Hi,

Please excuse my ignorance. I'm totally new to this.
I'm trying to get some data from a PHP-script via AJAX.

$(document).ready(function(){
 $(a#'. $catid .').click(function(){
$(#ajaxloadimage).ajaxStart(function(){
$(this).show();
});
$.ajax({
type: POST,
processData: true,
dataType: html,
url: getallfromcategory.php,
data: uid='. $cat_result['uid'] .',
success: function(txt){$(#show_'. $catid 
.').append(txt);}
});
$(#ajaxloadimage).ajaxStop(function(){
$(this).hide();
});
$(#show_'. $catid .').ajaxSuccess(function(){
$(this).slideDown(slow);
});
});
});

It works nicely in IE.
When I try in FF it works kinda.
When the PHP-Script only returns a small amount of data it's fine.
But when larger amounts of data gets retreived FF just hangs indefinite.

What am I doing wrong?
Could someone please advice on what I should do?
-- 
View this message in context: 
http://www.nabble.com/Newbie-Alert%3A-Problem-with-Ajax-tf3290902.html#a9153476
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/