[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Dhruva Sagar
LOL! I never saw that Thanks & Regards, Dhruva Sagar. Ogden Nash - "The trouble with a kitten is that when it grows up, it's always a cat." On Tue, Aug 25, 2009 at 3:51 PM, Liam Byrne wrote: > > Shouldn't it be > > http://local

[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Liam Byrne
Shouldn't it be http://localhost ? i.e. http[slash][slash]localhost L Alexander Cabezas wrote: Hi. When i try to make an ajax request like: $.get( "http:localhost:3001/account/create.json", SignUp.onComplete ); I get the following error in the firebug ( Net ): OPTIONS - 405 Method Not Allo

[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Nick Fitzsimons
2009/8/24 Alexander Cabezas : > When i try to make an ajax request like: > $.get( "http:localhost:3001/account/create.json", SignUp.onComplete ); > > I get the following error in the firebug ( Net ): > OPTIONS - 405 Method Not Allowed > > Is it related to cross-domain request?. > Probably not, as

[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-24 Thread Dhruva Sagar
Michael, >From his last statement / question , it seems to me that he is making the ajax request from a different server than the application itself. Hence I don't think he can use the relative URL that you're suggesting. Now coming to the error, I am not sorry but I don't have a very good idea ab

[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-24 Thread Michael Geary
What happens if you take your URL: http:localhost:3001/account/create.json and paste it into the address bar in Firefox and then hit Enter? Do you see it add something that was missing? :-) BTW, I assume your app is running on localhost:3001, is that right? I'd suggest using a relative URL ins

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread dkomo872
On Aug 20, 11:53 am, ak732 wrote: > Just be aware that doing the ajax call synchronously will block (lock > up) the browser until the request/response completes.  This is > typically okay when running locally, but can be very noticeable when > running on slower connections (e.g. shared hosting)

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread ak732
Just be aware that doing the ajax call synchronously will block (lock up) the browser until the request/response completes. This is typically okay when running locally, but can be very noticeable when running on slower connections (e.g. shared hosting). There's no reason why you cannot do this a

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread dkomo872
On Aug 20, 6:59 am, MorningZ wrote: > "Does anyone know what is wrong?  I've never seen an ordinary function > behave this way. " > > That's because $.post (and the resultant $.ajax) isn't "ordinary", > it's an asynchronous call and when you hit the line > >  jsonData = eval('(' + data + ')');

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread MorningZ
the code i posted should have no problem working as long as it is used properly... without seeing your actual HTML and where stuff is and what gets called, it's impossible to help completely. and the / thing won't matter that much as long as document.ready is used... but even that's a guess

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread MorningZ
and just to note success = SaveSearch_Success, should look just like that... it shouldn't be success = SaveSearch_Success(), or success = SaveSearch_Success(data), or *anything else*... it already "knows" to pass the resultant JSON to the function On Aug 20, 9:34 am, dkomo872

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread dkomo872
On Aug 20, 6:26 am, Chrazy wrote: > From the looks of it, why don't you use the $.ajax function and do > your stuff on success? Seems like an easier way to structure things. > > Sometimes a variable used in a function that you want to use elsewhere > has to be stored somewhere as it won't be re

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread dkomo872
On Aug 20, 6:59 am, MorningZ wrote: > "Does anyone know what is wrong?  I've never seen an ordinary function > behave this way. " > > That's because $.post (and the resultant $.ajax) isn't "ordinary", > it's an asynchronous call and when you hit the line > >  jsonData = eval('(' + data + ')');

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread ak732
Try doing this and see if it works: #msg_div {font-color:red;} $.post('save_search.php', formData, function(data) { jsonData = eval('(' + data + ')'); if (jsonData.return_status.search("successful") > -1) { $('#msg_div').html("Search was saved"); } else { $('#msg_div').html("Search

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread dkomo872
On Aug 20, 7:01 am, Leonard Martin wrote: > The trouble is that the $.post is run asynchronously so anything after > the $.post will be executed before the callback function. > > If you want the returned data to be available outside the callback > then it will have to be inside a function which

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread MorningZ
"Does anyone know what is wrong? I've never seen an ordinary function behave this way. " That's because $.post (and the resultant $.ajax) isn't "ordinary", it's an asynchronous call and when you hit the line jsonData = eval('(' + data + ')'); the script isn't back from the post call yet

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread Leonard Martin
The trouble is that the $.post is run asynchronously so anything after the $.post will be executed before the callback function. If you want the returned data to be available outside the callback then it will have to be inside a function which is called from within your callback method. e.g. v

[jQuery] Re: Problem with Ajax callback function in jQuery

2009-08-20 Thread Chrazy
>From the looks of it, why don't you use the $.ajax function and do your stuff on success? Seems like an easier way to structure things. Sometimes a variable used in a function that you want to use elsewhere has to be stored somewhere as it won't be recognized globally. Check http://docs.jquery.c

[jQuery] Re: problem with ajax request: request is not being sent

2008-08-29 Thread [EMAIL PROTECTED]
Can't anyone help me

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread VJ
Thanks a ton. It was a cross domain issue.. regards

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread Benjamin Sterling
Also, Do this instead: Click here to send email $("a").click(function() { alert("about to send"); $.ajax({ type: "GET",

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread Benjamin Sterling
Vijay, Are you working on that domain? Meaning, is url test url starting with http://129.219.208.31? If not, I would assume there is a cross domain issue. Do you have test page up that we can look at? On 10/19/07, VJ <[EMAIL PROTECTED]> wrote: > > > I d

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread VJ
i'm still unable to make it work.. I've enclosed it in $(document).ready(function(){ }); but still doesnt seem to work

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread VJ
I did put it , but still it isnt working... the url when pasted on the address bar in the browser(with a valid email) works fine.. but it's just not working here. On Oct 19, 9:10 am, "John Resig" <[EMAIL PROTECTED]> wrote: > You forgot to put a > > $(document).ready(function(){ > > }); > > Around

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread VJ
thanks, but it still does not seem to work.. if you copy & paste the url on the browser, it seems to work... but when passed thru the ajax method. it fails.. On Oct 19, 9:10 am, "John Resig" <[EMAIL PROTECTED]> wrote: > You forgot to put a > > $(document).ready(function(){ > > }); > > Around yo

[jQuery] Re: Problem with ajax in jquery.(Unable to figure this out)

2007-10-19 Thread John Resig
You forgot to put a $(document).ready(function(){ }); Around your code. --John On 10/19/07, VJ <[EMAIL PROTECTED]> wrote: > > I am unable to get the ajax to work in jquery. > Whenever i pass a .php url to $.ajax. it does not return and none of > the callbacks are executed. It justt hangs with

[jQuery] Re: problem with $.ajax()

2007-07-25 Thread Terry B
I want to say that it is now 2 (maybe 3) ip addresses. for sure, it is the localhost (127.0.0.1) address and one other ip address can use it. ~Terry On Jul 18, 11:26 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]> wrote: > > The "Developers Edition" is a single IP license. Only 1 IP address can >

[jQuery] Re: problem with $.ajax()

2007-07-18 Thread Dan G. Switzer, II
>Hi dan, thaanks for replay. >i use ff and fire baug: on my pc, i have this data from the first call: >{"CONFORMATO":1,"COMPLETO":"84,99","TAGLIE":[43,45,47,49,51,53,55,57,59,61] >}but >i remember that on the intranet server i get this object prepended by >coldfusion release, etc: cah be this the

[jQuery] Re: problem with $.ajax()

2007-07-18 Thread Dan G. Switzer, II
Salvatore, >Hi dan, you are right: on my pc, in the response tab of firebug, i have >{"CONFORMATO":1,"COMPLETO":"84,99","TAGLIE":[43,45,47,49,51,53,55,57,59,61] >}on >the intranet server i getCONTENT="ColdFusion DevNet Edition - Not for Production >Use.">{"CONFORMATO":1,"COMPLETO":84,"TAGLIE":[41

[jQuery] Re: problem with $.ajax()

2007-07-18 Thread John Farrar
pc is an intel, the intranet server is a amd > athlon.data are returned by a $.getJSON() request.can you, or other, > solve?regardssalvatore > - Original Message ----- From: "Salvatore FUSTO" <[EMAIL PROTECTED]> > To: > Sent: Wednesday, July 18, 2007 3:38 PM &

[jQuery] Re: problem with $.ajax()

2007-07-18 Thread Salvatore FUSTO
olve?regardssalvatore - Original Message - From: "Salvatore FUSTO" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 18, 2007 3:38 PM Subject: [jQuery] Re: problem with $.ajax() Hi dan, thaanks for replay. i use ff and fire baug: on my pc, i have this data from the first cal

[jQuery] Re: problem with $.ajax()

2007-07-18 Thread Salvatore FUSTO
coldfusion release, etc: cah be this the problem? and if so, how can i solve?regards- Original Message - From: "Dan G. Switzer, II" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 18, 2007 3:30 PM Subject: [jQuery] Re: problem with $.ajax() Salvatore, i'm developing

[jQuery] Re: problem with $.ajax()

2007-07-18 Thread Dan G. Switzer, II
Salvatore, >i'm developing an intranet order application using many ajax calls; this >app is fine on my pc intel pIV-2800 Mhz based, and on the internet, but >when i try to install in on the server on the intranet, it fails. >this server has an amd athlon x64 4400+, with 2Gb RAM. >if tou test htt

[jQuery] Re: problem with ajax

2007-05-23 Thread Daniel Hollocher
I see, thanks guys. I guess I can't do it without making server side changes. O well! Dan On 5/23/07, Mike Alsup <[EMAIL PROTECTED]> wrote: > > > The key to this working properly is to ensure that the server is > returning its response with an XML mime type. > > In PHP do this: > > > In JS

[jQuery] Re: problem with ajax

2007-05-23 Thread Mike Alsup
The key to this working properly is to ensure that the server is returning its response with an XML mime type. In PHP do this: In JSP do this: <[EMAIL PROTECTED] contentType="text/xml"%> In CF do this: Mike On 5/22/07, Danbh <[EMAIL PROTECTED]> wrote: Hey everyone, I'm trying to

[jQuery] Re: problem with ajax

2007-05-22 Thread Benjamin Sterling
I personally have never pulled in a page like that, but I do something like below: /* * @example * loadPageViews('theurl.htm', function(){anyfunction();}, '#whattoremove, '#whattoappendto'); * @desc loads an element/view and removes an element and appends to * another element the return value. *

[jQuery] Re: Problem with AJAX and links

2007-04-17 Thread Kelvin Luck
You can use the .is() method. It would look something like this on your code: function hijackLinks(root) { $('a',root).click(function(){ $this = $(this); if ($this.is(".admin-link")) { // If admin link, load into sub-admin area $('.admin-area'

[jQuery] Re: Problem with AJAX and links

2007-04-17 Thread digital spaghetti
That seems to have done the trick, most of my problems now are down to design issues and just need cleaning up. Thanks folks, Tane On 4/17/07, Kelvin Luck <[EMAIL PROTECTED]> wrote: You can use the .is() method. It would look something like this on your code: function hijackLinks(root) {

[jQuery] Re: Problem with AJAX and links

2007-04-17 Thread digital spaghetti
Bahh, I've found a bug. In the code when I get type, I check to see if type == "whatever". But it seems if my links have more than 1 class, it fails. For example my code may have Add Post - this is ignored. Whats the best way to check to see if a link contains the class, without doing a == se

[jQuery] Re: Problem with AJAX and links

2007-04-17 Thread digital spaghetti
Hi Sean, Thanks, that seems to have done the trick - although it broke the Tabs plugin I was using in my admin interface. I've created a workaround and this works perfectly: function hijackLinks(root) { $('a',root).click(function(){ var type = $(this).attr('class'); if (type ==

[jQuery] Re: Problem with AJAX and links

2007-04-17 Thread Sean Catchpole
Hi Tane, function hijackLinks(root) { $('a',root).bind('click', function(){ $('.content').load(this.href); return false; }); }; I would change this function to this instead of doing all that ajaxStart/Stop: function hijackLinks(root) { $('a',root).click(function(){ $('.conte

[jQuery] Re: Problem with AJAX and links

2007-04-17 Thread digital spaghetti
Hi, Can anyone help with this please? This is a major UI issue for me now, and I cannot seem to get it to work. I've tested on both FF2 and Opera 9, and both are the same - initial links from the main document work, but links inside the loaded content don't. I'm using CakePHP for the backend