[jQuery] Ajax problem on Safari/Chrome browsers

2009-09-26 Thread indre1

Any suggestions, why this code is not working on Webkit browsers:

(function($) {
  $.fn.followUser = function(userId) {
  this.fadeOut(250);
  $.get(profile.php, { do: addfriend, id: userId }, function(data)
{
  return this.html('pFollower added/p').fadeIn(250);
  });

  }
})(jQuery);

Only jquery and the plugin printed above are loaded, so there
shouldn't be any conflicts.

HTML:
div id=followButton2
a onclick=$('#followButton2').followUser('2')test1/a
/div


Chrome gives the following error:
Uncaught TypeError: Object #an Object has no method 'followUser


[jQuery] $ajax() problem

2009-08-10 Thread yi

$.ajax({

type: POST,

url: mywebpage.aspx?Arg=+args2,

contentType: text,

data:{},

dataType: text,

success: CompleteInsert,

error: onFail

});

I dont know why the onFail function is going to be executed when args2
is too big.
args2 is a string type
can anyone explain this
thanks


[jQuery] AJAX Problem

2009-05-07 Thread Arak Tai'Roth

Hi there, so I am trying out jQuery recently, moving from MooTools,
and needed to do some AJAX. Here is my code:

$(document).ready(function(){
$('#events_box a.ajax_replace').click(function(e){
e.preventDefault();
$('.news_border').slideUp('slow');

$.ajax({
method: 'get',
url: e.attr('href'),
data: { 'do' : '1' },
beforeSend: function(){
alert('beforeSend');
$('#loader').show('fast');
},
complete: function(){
alert('complete');
$('#loader').hide('fast');
},
success: function(html){
alert('success');
$('.news_border').html(html).show('slow');
}
});
});
});

As far as I have read on these groups, the documentation, and some
tutorials I found this should work. Everything before the $.ajax
request works fine, however nothing within the $.ajax gets processed.

I'm pretty positive what I am using in the data: area is wrong, it's
what I use in MooTools. However I have heard before that my current
host (Dreamhost) requires data to be sent in an AJAX request in order
to make it work, so I think I need to include something even though I
need no actual data sent in this request. Taking out the data line
does not fix the problem.

Can anyone point me in the right direction?


[jQuery] AJAX Problem

2009-04-17 Thread Rogue Lord

Hey folks, I noticed that when I was using $.ajax() on a $('a').click
() to pull up an external page (eg stats.php within the same
folkder) within a div called #main_content that any link that was
pulled up in that would not have the same effects as outside of it. Is
there a way to pass the inheritance over to the links in the in div
that is holding the new page? I appreciate any advice before hand!


[jQuery] ajax problem in IE

2009-03-29 Thread webguy262


I have two forms on a page (www.eastexhaust.com/inventory.php).

One uses ajax to generate a part number by selecting values from a series of
selection boxes.

The other form emails the part number so we can reply with a quote.

Everything works fine in FFox, but does not work in IE.

Therefore, I have had to make things harder by asking the user to copy and
paste their part number into the email form instead of having it entered
there automatically.

To display the part number to the user, I'm using this in the JS...

document.getElementById('myspan').innerHTML = result;

...and this in the html...



To get the variable in the email form, I'm using this in the JS...

document.getElementById('partnum').value= result;

...and this in the html...

input type=text name=partnum id=partnum readonly

As I said, this works everywhere but not in IE.

How can I use Jquery to make it work across the board?

Thanks! 
-- 
View this message in context: 
http://www.nabble.com/ajax-problem-in-IE-tp22772776s27240p22772776.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] [AJAX] Problem with loading jquery through ajax

2009-02-17 Thread r1u0...@gmail.com

Hi,

I've got master page with menu. When I click on menu option new page
should be loaded (quite normal :P).
I'm trying to do that using:
$.post(hotline.aspx, function(data) { $(#load).html(data); });

And div load is populated with html, but it seems like it isn't
executed (there is f.e. jquery.js included, it's loaded - I've checked
with firebug - but it isn't executed).

When I open hotline.aspx in new window, everything is ok, but when
from master page - fail.

I was trying to do that with get, $.ajax, load, post but nothing is
changed. Should I fire some additional function after load completed?

Regards
Radek


[jQuery] Ajax Problem with IE works fine on FF

2009-02-04 Thread Xross

Hi,

I am having problem with IE6 / IE7 but IE8 works fine.

Here's my ajax call

***

function getJSonDate() {
var Usex =;
var Uminage = ;
var Umaxage =;
var Ucountry =;
var Uplace = ;
var Uzip =;

Usex = $(#gender :selected).val();
Uminage = $(#minage :selected).val();
Umaxage = $(#maxage :selected).val();
Ucountry = $(#country :selected).val();
Uplace = $(#place :selected).val();
Uzip = $(#zipcode).val();
$(#preloader).show();
$.getJSON(
getdateJSon.php, {gender: Usex, minage: Uminage, 
maxage: Umaxage,
zip: Uzip, cache: false},
function(data){
$.each(data.userdata, function(i,user){
ckuserid = user.id;
var name_text  =  user.pname;
var age_text = user.page;
var place_text = user.pplace;
var state_text = user.pState;
var country_text = user.pCountry;
var hello_text = user.ptextdesc;
var imgurl = user.imgurl;
var imagepath = images/user/ + imgurl;
$(#preloader).hide();

if (name_text == ){

$(#imageControl).hide
();
$(#text_holder).hide();
$(#ZeroEntry).show();
} else {


$(#ZeroEntry).hide();

$(#imageControl).show();

$(#text_holder).show();

$('#imageholder').attr('src', imagepath);

//Populate the 
page with data

$('h2.date_name').html(name_text);

$('h3.date_details').html(age_text + y,  + place_text + ,
+ country_text );

$('P.hellotext').html(hello_text);


}


});
}
);

} //end of getJSonDate



Here is PHP page output


{ 'userdata': [ { 'id':'10001', 'pname':'Mikeala', 'page':'18',
'pplace':'New York', 'pState':'New York', 'pCountry':'USA',
'ptextdesc':'I like reading books, Travel, what about you ?',
'imgurl':'mikeala.jpg' } ] }



It works perfectly fine with FF / IE 8 but nothing comes up with IE
6 / IE 7 i have tried many solution but none worked i wonder if their
exists any solution. i have other functions like get state/city/
Country name from mysql db through the same method they work fine but
this is the only problem.

i have everything online you can check it at

http://clickdate24.com/beta/

Any help is appreciated.

Thanks.



[jQuery] Ajax Problem

2009-01-27 Thread saiful.ha...@gmail.com

hi all,

I have 2 file

rating.js
$(document).ready(function() {
  var behav = function(){
$(.rating_class).hover(function(){
  $(#tooltip_star).css({visibility:visible, top:($
(this).offset().top - 60), left:($(this).offset().left+$(this).width
()+ 2)});
  $.ajax({
type: POST,
url: $(this).attr(href),
success: function(msg){
  $(#tooltip_star).html(msg);
}
  });
}, function(){
  $(#tooltip_star).css(visibility,hidden);
}).ajaxStart(function(){
  $(#tooltip_star).html(table class=\table_animation
\trtdimg style=\text-align:center\ src=\/resource/images/
loading.gif\/td/tr/table);
});

$(.rating_class).click(function(){
  location = $(this).attr(href).replace(ajax_, );
  return false;
});
  }

  behav();
});

there is just call function behav(); to run all sintax in this file,

and i have some ajax sintax in other file file this

$(document).ready(function() {

var mainApp = function(page){
  $.ajax({
type: POST,
url: ?= base_url();?product/related/?= $idProduct ?
/+page,
success: function(msg){
  $(#displayRelated).html(msg);
  behav();
}
  });
}

mainApp(1);

});

But i get some error in my firebug like this

behav is not defined
success()()6 (line 652)
success()jquery-1.2.6.js (line 2818)
onreadystatechange()()jquery-1.2.6.js (line 2773)
[Break on this error] behav();

my question is, why my function behav() in rating.js can't called from
success: function(msg){...}, there is need something like global
function?

thang's

~ saiful haqqi ~


[jQuery] Ajax problem - undefined error

2008-06-03 Thread symtab

Hi,

I'm new to jquery. I want to develop a upload progress bar using
jquery and PHP (i already did this
with xajax and php, but i want to use jquery this time). Does anyone
know why this doesnt work:

$(document).ready(function() {
function progress()
{
$.ajax({
type: POST,
url: http://URL/ajax/uploadProgress/;,
data: upload_id= + $('#UPLOAD_IDENTIFIER').val() +
file= + $('#video_file').val() + debug=,
cache: false,
dataType: json,
success: function(data){alert(Data Saved:  +
data.msg );},
error: function(XMLHttpRequest, textStatus,
errorThrown) {
alert('XMLHttpRequest:
'+XMLHttpRequest);alert('textStatus: '+textStatus);alert(Error:  +
errorThrown);
}
});
}
$(#submit_video_upload).click(function(event) {
alert('start');
event.preventDefault();
var upload_id=$('#UPLOAD_IDENTIFIER').val();
var upload_file=$('#video_file').val();
$.post(http://URL/ajax/uploadProgress;, { upload_id:
upload_id, file: upload_file },
function(response) {
$(#upload_status).fadeIn();
if ( response.status == 0 ) {
progress();
$(#videoUploadForm).submit();
} else {
$(#upload_status).html(response.msg);
}
}, json);
alert('end');
});
});

On #submit_video_upload.click the ajax call is executed correctly and
a json string is received from the server,
second time (in function progress()) the ajax call doesnt work
anymore, and the error i get (errorThrown) is undefined). I also tried
with the same function (with $.post) in progress().

Any ideas?

Thanks,
Adrian.


[jQuery] AJAX problem on Internet Explorer

2007-10-17 Thread Sharan

Hello Everybody,
   Please go to this page http://iconsushi.com/products/ . and add
the product by clicking on + icon. The product icon shows up in the
shopping cart by AJAX. Now when you click on the product icon (in
shopping cart) again it gets removed from the shopping cart. This
functionality is working fine in Firefox but not in IE.

Here is the code which i m using for this purpose:

function deletefromcart() {
var href=$(this).attr('href');
var o={};
$(#tooltipHelper).hide();
$.get( href+'/ajax/', o, function() {
$('.orders').empty();
$('.orders').html('div 
class=loadingUpdating Cart.../div');
$(#temp-cart2).height(200);

$('.orders').load('/shopping_carts/minicart/',function(){
$('.deletefromcart').bind('click', 
deletefromcart);
$
('.deletefromcart').ToolTip(
{   

className: 'inputsTooltip',
position:
'mouse',
delay: 
150
}
);
});

  });
return false;
}


Any help is appreciated .

Regards,
Sharan



[jQuery] jquery ajax problem

2007-09-25 Thread luigi7up

Hello everyone, I think Ill go go nuts!

I already posted something about problem Im facing with but I didn't
get the right answer so Ill try again by expaining my problem further.

My PHP website is organised in following manner:

MAin file is index.php and it includes other files. So, my
components are included by setting URL for example index.php?
kom=gallery. Everything in gallery

file (and all others) is printed into global variable $htmlOutput.=
and is echoed at the end of execution of index.php.

Gallery file, for example, runs switch($_POST[task]) and calls
different functions depending on value of ($_POST[task].

One function outputs HTML form where you can input username. I want to
check if username is already taken by querying my database. Normal
check would be by

pressing submit button but I want ajax to check availability and to
output message. For ajax check I've set a function fAjaxCheck() that
is triggered by

$_POST[task] = ajaxCheck. That function looks like this

ajaxCheck()
{
//Find if DB has that us ername
//if database returns so mething it means tahat usuername is already
taken

if(empty($result))
{
//Username taken
echo no;
exit;
}
else
{
//Username ok
echo yes;
exit;
}

}

I get my index php page html as a result!!!

This is jquery Im using:

$.post(\index.php?kom=gallery\,
{
  task:'is_username_taken',username: $('#username').val()},
  function(data){
  alert(data);
})

I can't understand why do I keep getting this result. exit() at the
and of if/else should stop script from working and my $htmlOutput
variable at the end of index.php sholud never be echoed.

Do you have any idea how to solve this? Why do I get all that html
when I shold be geting only things from my ajaxCheck() function, thing
I explicitly echo!?

Thank you and sory for the trouble...



[jQuery] Ajax Problem?

2007-05-23 Thread [EMAIL PROTECTED]

I write this simple code. I check it by using firefox and firebug and
firebug gives me  that the request is successful. But  I don't see the
box ok!??? So what is the problem?

$.ajax({
   type: GET,
   url: feed.xml,
   dataType: json,
   success: function(msg){
 alert(ok!);
   }
});

I try another way.
 $.getJSON(feed.xml, function(json){
   alert(ok!');
 });
and there is the same problem.
So  how can I solve it?
Here is the complete file:

html

head
meta http-equiv=Content-Type content=text/html;
charset=windows-1252
titleNew Page 1/title
script language=javascript src=jquery.js/script
/head

body
script language=javascript
$.ajax({
   type: GET,
   url: feed.xml,
   dataType: json,
   success: function(msg){
 alert(ok!);
   }
});
 $.getJSON(feed.xml, function(json){
   alert(ok!);
 });
/script
/body

/html

I don't know what happens!



[jQuery] Ajax problem with mac osX

2007-04-21 Thread junior2000

Hi,
I've a problem with an ajax call only on mac systems. On windows and
linux works well.
In the systems with problem firebug displays that the post request
don't load.
I've used the last jquery and the forms plugin.
Here the script:

Thanks for any suggestion.

script type=text/javascript language=JavaScript
!--

$(document).ready(function(){

function calcolaCostoNoleggio() {

nSettimane=0;
nMesi=0;
nTipoDurata=$(:radio).fieldValue();
nDurata=$(#durata).val();
nCliente=$(#idc).val();
nProduct=$(#id).val();

$.ajax({ type: POST, url: costonoleggio.php, data:
durata=+nDurata+tipo_durata=+nTipoDurata+idc=+nCliente
+id=+nProduct, dataType: xml, success: function(xmlData) {


$(#costo).html($(costo,xmlData).text());
abbonamento=$(abbonamento,xmlData).text();
if (abbonamento2) $(#copertura_abbonamento).html(L'abbonamento non
copre interamente il noleggio);
else $(#copertura_abbonamento).html(L'abbonamento copre interamente
il noleggio);


}
});

}

calcolaCostoNoleggio();



  $(#durata).change(function(event){
calcolaCostoNoleggio();
});


$(#tipi input).click(function(event){
calcolaCostoNoleggio();
})


});


//--
/script



[jQuery] AJAX Problem

2007-04-07 Thread dropx

hi guys,
i am trying to write a simple ajax code with $.ajax() function.
however the Firebug plug-in in Firefox show this error:

[Exception... 'Permission denied to call method XMLHttpRequest.open'
when calling method: [nsIDOMEventListener::handleEvent]  nsresult:
0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)  location: unknown
data: no]

in the IE it is working there is not any problem.

my code is this:
 var txt = $.ajax({
url:http://../../Posts.xml;,
type:GET,
dataType:xml
}).responseText;

i need help. thnks...