[jQuery] Re: getScript - Site does not finish loading?

2010-01-12 Thread chricke
i do know that i have this (recursiv) call to the function again on success... but thats how it should work. getScript seems to be just a kind of ajax call and, because of that, should be asyncronous. so in my understanding of this function there should not be this kind of behaviour - when you use

Re: [jQuery] Re: $.getScript results in two requests!

2009-11-27 Thread Michael Geary
Glad you tracked that down - pretty nasty bug in Firebug! Just curious, 1.3 is still a pretty old version. Any reason not to use the latest Firebug 1.4.5? -Mike On Fri, Nov 27, 2009 at 2:43 AM, Eric wrote: > Hey there, > > Thanks for your answers. Sorry I didn't reply earlier, been pretty > bu

[jQuery] Re: $.getScript results in two requests!

2009-11-27 Thread Eric
Hey there, Thanks for your answers. Sorry I didn't reply earlier, been pretty busy. It turned out the problem was caused by an old version of Firebug ( http://code.google.com/p/fbug/issues/detail?id=928 ). I am now using Firebug 1.3 on Firefox 3.5, where the bug is fixed. Eric On 25 Nov., 17:03,

[jQuery] Re: $.getScript results in two requests!

2009-11-25 Thread donb
Be very certain you don't accidentally bind a click function twice somehow. Assuming, that is, a click initiates the action. Setting a Firebug breakpoint on entry to the repeated code, then inspecting the Stack panel to see how you got there each time, will probably reveal how this occurs. On No

[jQuery] Re: $.getScript results in two requests!

2009-11-25 Thread KeeganWatkins
just out of curiosity, have you checked to make sure you aren't using the $.ajax() method (or one of its convenience methods) elsewhere? i see in the first set of headers that the "X-Requested-With" header is present, which is generally added by jQuery (and most other libs) when a request is submit

[jQuery] Re: $.getScript()

2009-09-07 Thread Ross Hadden
Alright Thank you. That is exactly the kind of answer I was looking for. See, I don't use $.getScript in place of

[jQuery] Re: $.getScript()

2009-09-07 Thread Michael Geary
Why do you want to use $.getScript to load those .js files? Is there a reason you don't want to use

[jQuery] Re: $.getScript()

2009-09-07 Thread Ross Hadden
The website in question is http://os.rosshadden.com/ The only change needed to change it from working to the state it is in now is changing the script calls from to $.getScript On Mon, Sep 7, 2009 at 5:00 PM, Michael Geary wrote: > Unless there is a known issue, I don't think anyone can answ

[jQuery] Re: $.getScript()

2009-09-07 Thread Michael Geary
Unless there is a known issue, I don't think anyone can answer your question based on the information you've provided. Can you post a link to a test page that demonstrates the problem you've encountered? That would allow people to actually take a look at it and try it for themselves in Chrome and o

[jQuery] Re: $.getScript()

2009-09-07 Thread Ross Hadden
Anyone? Please? On Sat, Sep 5, 2009 at 6:14 PM, rosshadden wrote: > > Is it a known issue that $.getScript() does not work in Chrome, or > could I be doing something wrong? > > I am able to load scripts using this function in any browser, but in > order for me to be able to use their contents in

[jQuery] Re: getScript() issue under ie6 (undefined variable)

2009-07-17 Thread Olivier
Well, I have tried with real ie6 under windows XP and I get the same error. It seems the script is not executed. Could it be a jquery bug ? On 14 juil, 14:32, Olivier wrote: > Hi, > > I'm usinggetScriptto load a script which basically contains a > variable, and then i'm using this variable in th

[jQuery] Re: getScript problem with ie6

2009-07-08 Thread Luca Maggioni
Obivously, I think that the problem is not microsoft virtual earth scripts. I thing that the problem is the fact that I raise an event before the download is finished... it could be any type of scripts On 7 Lug, 10:56, Luca Maggioni wrote: > Hi > > I download asynchronously a js with: > $.getScr

[jQuery] Re: getScript does not always work for me

2009-07-07 Thread Nikki Locke
Just to bring you up to date, turns out the problem wasn't the ajax call not returning, it was in the code that processed the call, which hung the browser! The offending call was somthing like: $("a[href='javascript:Submit('text')']") On Jun 26, 11:45 am, Nikki Locke wrote: > Further to this, m

[jQuery] Re: getScript does not always work for me

2009-07-02 Thread Nikki Locke
Thanks for the help. Turns out my problem is completely unrelated - some of the code I was executing in response to the request was hanging the browser! So I wasn't seeing any of my log output. I'm starting a new thread on it, as it is to do with quoting inside jquery selectors. On 29 June, 04:

[jQuery] Re: getScript does not always work for me

2009-06-28 Thread e.a.
BTW, it is working. Here is the output of http://jsbin.com/umuwi : Hello from JS Bin www.trumphurst.com ready sent request got reply href received On Jun 26, 1:45 pm, Nikki Locke wrote: > Further to this, my real application is hanging the browser, and I > don't know how to find out what is wr

[jQuery] Re: getScript does not always work for me

2009-06-28 Thread e.a.
Hello, try to use setTimeout. For example: setTimeout(function(){$.getScript("the_script_you_want_to_fetch");}, 500); Increase or decrease the timeout according to your needs. On Jun 26, 1:45 pm, Nikki Locke wrote: > Further to this, my real application is hanging the browser, and I > don't kn

[jQuery] Re: getScript does not always work for me

2009-06-26 Thread Nikki Locke
Further to this, my real application is hanging the browser, and I don't know how to find out what is wrong :-( I have tried it with IE8, Firefox, Safari and Chrome - the browser always hangs at some point. Any suggestions what to try next would be very gratefully received. On 25 June, 20:57, N

[jQuery] Re: getScript does not always work for me

2009-06-26 Thread Nikki Locke
Well, this morning the same web page works. Looks as if the jsbin.com editor app is messing things up, as it doesn't work properly when displayed in the editor. So that's a red herring, then, and I am no nearer finding out why getScript sometimes doesn't return at all in my real app :-( Sorry fo

[jQuery] Re: $.getScript Must Take .js File?

2009-04-24 Thread nlloyds
See also this discussion: http://groups.google.com/group/jquery-en/browse_thread/thread/f9b57a8e00662d84/fb73b4affb81a816 Nathan

[jQuery] Re: $.getScript Must Take .js File?

2009-04-24 Thread nlloyds
On Mar 26, 1:11 am, Code Daemon wrote: > I am using codeigniter and it forms urls like this: > > http://mydomain/index.php/system/edit_js > > I'm trying to call $.getScript by going: > > $.getScript( ") but I get a > 404 not found error. I pasted the url in my webbrowser and it works > just fine.

[jQuery] Re: $.getScript fatal error with XML.

2009-02-17 Thread Ricardo Tomasi
AJAX doesn't work cross-domain, doesn't matter what function you are using. You have to either use JSONP (http://remysharp.com/2007/10/08/ what-is-jsonp/) or a proxy on your server. On Feb 17, 12:48 pm, Kuma Pageworks wrote: > I get the 'restricted URI' error - since the URL is on a remote > se

[jQuery] Re: $.getScript fatal error with XML.

2009-02-17 Thread Kuma Pageworks
I get the 'restricted URI' error - since the URL is on a remote server, $.get isn't working. I may have to use $.ajax. On Feb 17, 2:01 am, Ricardo Tomasi wrote: > getScript is, as it's name says, for getting scripts. What happens > when you use the code below? > > $.get(getURL, function(xml){ >

[jQuery] Re: $.getScript fatal error with XML.

2009-02-17 Thread Ricardo Tomasi
getScript is, as it's name says, for getting scripts. What happens when you use the code below? $.get(getURL, function(xml){ alert(xml); }); On Feb 17, 3:33 am, Kuma Pageworks wrote: > I posted about this before, but the response didn't help - so I > thought I'd try posting again. > > I hav

[jQuery] Re: $.getScript - passing the response.

2009-02-12 Thread Nic Luciano
Close but You should be using .get() for this, with an onsuccess callback (also see datatype). .getscript is solely for loading javascript files to execute. Sent from my iPhone On Feb 11, 2009, at 11:13 PM, "brian.overl...@gmail.com" > wrote: I'm using $.getScript to get XML from a rem

[jQuery] Re: getscript without parameters... an alernative?

2009-02-04 Thread Eric Garside
Oh, neat. I didn't know jQuery continued to fire docready code after it loaded. Awesome. :D On Feb 4, 10:14 am, Ricardo Tomasi wrote: > Actually after the document has loaded, any function passed to $ > (document).ready() will fire immediately. Also functions are called in > the order they were

[jQuery] Re: getscript without parameters... an alernative?

2009-02-04 Thread Ricardo Tomasi
Actually after the document has loaded, any function passed to $ (document).ready() will fire immediately. Also functions are called in the order they were added, so you can put it inside the getScript callback like this: $(document).ready(function(){ x = function(d){ alert(d) }; }); $.getScr

[jQuery] Re: getscript without parameters... an alernative?

2009-02-04 Thread Eric Garside
Basically, the problem is this here: $(document).ready(function(){ You wrapped it inside an event that will only fire when the document throws its ready event. If you include the script after the page is loaded, regardless from where, th event will never fire. If you remove the "$(document).ready

[jQuery] Re: getscript without parameters... an alernative?

2009-02-04 Thread pere roca
hi Eric, I don't understand what you mean... the functions in script.js (called via getScript) work if I call $.getScript but I wanna call these functions from outside (after script is loaded), so I can pass some parameter to the functions that are inside script.js. $.getScript is n

[jQuery] Re: getscript without parameters... an alernative?

2009-02-04 Thread Eric Garside
If you call $.getScript after your regular scripts are already loaded, domready will not fire again. On Feb 4, 8:16 am, pere roca wrote: > hi all, > if I'm not wrong we cannot send parameters to a script called by getScript > function; > so, if we "download" or get the script and then we call a

[jQuery] Re: $.getScript in Firefox 3

2008-10-08 Thread robert_shipley
Anyone got any further ideas on this one? Rob

[jQuery] Re: $.getScript in Firefox 3

2008-09-16 Thread Mark T
Actually, scratch that - it seems to be working now. I'd still appreciate a comment from a jQuery guru on the original problem I've worked around here! Mark.

[jQuery] Re: $.getScript in Firefox 3

2008-09-16 Thread Mark T
Hmm, actually I think I'm still getting the problem, it's just being quiet about it now :( On Sep 16, 3:00 pm, Mark T <[EMAIL PROTECTED]> wrote: > Ok, my temporary fix has been to alter the following block of code > from line 2656 in jquery 1.2.6: > >                 // If we're requesting a remo

[jQuery] Re: $.getScript in Firefox 3

2008-09-16 Thread Mark T
Ok, my temporary fix has been to alter the following block of code from line 2656 in jquery 1.2.6: // If we're requesting a remote document // and trying to load JSON or Script with a GET if ( s.dataType == "script" && type == "GET"){

[jQuery] Re: $.getScript in Firefox 3

2008-09-16 Thread Mark T
I'm getting even more convinced that this is an issue with FF3 & jQuery. Interestingly, it only affects local JS files, which are inserted as text into the head of the document between script tags. Remote files, which are loaded using

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-16 Thread jquertil
fn( variable ); > }); > }, > somethingElse : '' > }; > > blah.dynaLoad('cool beans'); > > -Mike > > > -Original Message- > > From: jquery-en@googlegroups.com > > [mailto:[EMAIL PROTECTED

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-08 Thread Michael Geary
fn( variable ); }); }, somethingElse : '' }; blah.dynaLoad('cool beans'); -Mike > -Original Message- > From: jquery-en@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of jquertil > Sent: Tuesday, July 08, 2008 1:37 AM > To: jQu

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-08 Thread jquertil
thanks for the answer Mike. I probably wasn't very clear. I'm trying to make the loading happen as part of blah.something(variable). something kinda like this: var blah ={ dynaLoad : function(variable){ $.getScript('alert.js',variable) // the script would simply contain the line "alert

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-06 Thread Michael Geary
This is all from the same domain, so you don't have cross-domain issues, right? I just tried this code, and it works nicely: $.get( 'alert.js', function( code ) { var blah = { something : new Function( 'variable', code ), something_else : 'hello' };

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-06 Thread jquertil
i should be more clear: I made it work but I can't pass variables to my external snippet: this works: alert.js contains "alert(variable);" something : function(){ $.getScript('alert.js'); } but this does not work: --- alert.js contains "alert(vari

[jQuery] Re: $.getScript in Firefox 3

2008-07-04 Thread robert_shipley
Any one got any ideas?? On Jun 25, 10:12 am, robert_shipley <[EMAIL PROTECTED]> wrote: > I've been developing a website and we usegetScriptto load all of our > javascript files (other than jQuery) so the header of the page is > shorter. We have a mechanism in place which allows functions to be >

[jQuery] Re: getScript Problem

2008-06-08 Thread Michael Geary
Here's an untested plugin that should do the trick (it's essentially the same logic I use elsewhere): (function( $ ) { $.getScripts = function( urls, callback ) { var n = urls.length; $.each( urls, function( i, url ) { $.getScript( url, function() {

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-23 Thread hj
On Apr 21, 3:41 pm, cfdvlpr <[EMAIL PROTECTED]> wrote: > Is it possible to remove a script from a page dynamically? Something like this was just discussed on another mailing list that I read. The answer is something like: A) Remove the script element itself from the DOM. This accomplishes p

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-23 Thread A Paella
If it's a library script you could remove the function from the window scope (or the object in jquery, ie) On Tue, Apr 22, 2008 at 12:41 AM, cfdvlpr <[EMAIL PROTECTED]> wrote: > > Is it possible to remove a script from a page dynamically? >

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-23 Thread Diego A.
that's a point, but as Jake and Yansky have pointed out, once the script is downloaded and executed it will have "done stuff" and "stored stuff in memory". Removing a script doesn't change anything. Perhaps the question needs rephrasing... ...which will beg another question: what exactly does the

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-22 Thread Shawn
If your script happend to be loading a specific object, you can just set that object to an empty string or use the delete() function in native JS. Just a thought. Shawn Yansky wrote: What would be the point? The script would have already loaded. cfdvlpr wrote: Is it possible to rem

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-22 Thread Yansky
What would be the point? The script would have already loaded. cfdvlpr wrote: > > > Is it possible to remove a script from a page dynamically? > > -- View this message in context: http://www.nabble.com/getScript-is-great-to-add-scripts-dynamically%2C-but-how-might-you--remove-scripts--tp1

[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-22 Thread Jake McGraw
Which begs the question, Why would you want to remove scripts? Once a script has been included, it should have executed, so what do you gain by removing it? - jake On Mon, Apr 21, 2008 at 6:41 PM, cfdvlpr <[EMAIL PROTECTED]> wrote: > > Is it possible to remove a script from a page dynamically?

[jQuery] Re: getScript making multiple calls

2008-01-31 Thread pedalpete
This is awesome Feed, I was having the exact same problem. The reason why it loads multiple times (it seems to me) is that jquery is appending the new objects to the previous list it holds when the function is run. Not sure if this is a jquery error, or just the way things are supposed to be. Ho

[jQuery] Re: getScript making multiple calls

2007-12-04 Thread Feed
Thanks for the link Jörn, but I solved my problem... let me explain again what the problem was: after loading new ajax content I had to run the script in this newly loaded content, but instead of duplicating the code and put as the FAQ suggested I wanted to run ALL THE SCRIPT again, so I thought a

[jQuery] Re: getScript making multiple calls

2007-12-03 Thread Jörn Zaefferer
Feed schrieb: What am I doing wrong and how can I run the script on the part of the site which has been loaded by ajax? This should answer your question: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F Jörn

[jQuery] Re: $.getScript and variables

2007-09-10 Thread Equand
thanks, i found the problem... i defined all of the functions and global vars inside 'document ready' function... doh, thanks anyways. On Sep 10, 5:58 pm, Equand <[EMAIL PROTECTED]> wrote: > ok... this page...http://www.jppromo.ru: there is A LOT of code, so > search in code for //ADMIN AREA STAR

[jQuery] Re: $.getScript and variables

2007-09-10 Thread Equand
ok... this page... http://www.jppromo.ru : there is A LOT of code, so search in code for //ADMIN AREA START and //ADMIN AREA STOP, the code between them is the one i want to put into a separate file, for load via getScript... but there are used global vars like LASTLOGIN and LASTHREF etc, and glob

[jQuery] Re: $.getScript and variables

2007-09-10 Thread Michael Geary
Is what real? Equand, I read your posts, but I'm not sure what you're trying to do or what the question is. Could you explain in more detail, with some actual code? Maybe post a link to a page, or at least post a code sample? -Mike > From: Equand > is it real? > > *global for $(document).re

[jQuery] Re: $.getScript and variables

2007-09-10 Thread Equand
is it real? On Sep 10, 4:37 am, Equand <[EMAIL PROTECTED]> wrote: > *global for $(document).ready(function() { SPACE }; ... > > On Sep 10, 4:33 am, Equand <[EMAIL PROTECTED]> wrote: > > > i forgot to mention... i tried to put it into a function and pass > > global vars in it thru functions vars..

[jQuery] Re: $.getScript and variables

2007-09-09 Thread Equand
*global for $(document).ready(function() { SPACE }; ... On Sep 10, 4:33 am, Equand <[EMAIL PROTECTED]> wrote: > i forgot to mention... i tried to put it into a function and pass > global vars in it thru functions vars... and ofcourse they've lost > their globality... > > On Sep 10, 4:31 am, Equan

[jQuery] Re: $.getScript and variables

2007-09-09 Thread Equand
i forgot to mention... i tried to put it into a function and pass global vars in it thru functions vars... and ofcourse they've lost their globality... On Sep 10, 4:31 am, Equand <[EMAIL PROTECTED]> wrote: > Hi everybody... i have a question... > i want to virtualise my admin section... by gettin

[jQuery] Re: getScript Safari fix

2007-07-11 Thread Dave Stewart
Whoops, forgot to mention, I had set up this page to test it: http://www.conciencia.net/Temp/IncludeTest.htm

[jQuery] Re: getScript problem

2007-06-18 Thread Jacky
Oh, how stupid I am. Thank you! On 6/18/07, Mike Alsup <[EMAIL PROTECTED]> wrote: jQuery's getScript implementation uses ajax and therefore you can not make cross-domain requests. But Michael Geary has a nice JSON plugin: http://mg.to/2006/01/25/json-for-jquery Mike On 6/17/07, Jacky <[EMA

[jQuery] Re: getScript problem

2007-06-17 Thread Mike Alsup
jQuery's getScript implementation uses ajax and therefore you can not make cross-domain requests. But Michael Geary has a nice JSON plugin: http://mg.to/2006/01/25/json-for-jquery Mike On 6/17/07, Jacky <[EMAIL PROTECTED]> wrote: I have tried to test on the twitter json and so I use the getS

[jQuery] Re: .getScript()

2007-04-05 Thread Mike Alsup
Nice! jQuery.getCSS = function( url, media ) { jQuery( document.createElement('link') ).attr({ href: url, media: media || 'screen', type: 'text/css', rel: 'stylesheet' }).appendTo('head'); }; And one could use it l

[jQuery] Re: .getScript()

2007-04-05 Thread Rob Desbois
Pedro the $.getScript function is for use *only* to load scripts, hence the naming. It sets the dataType parameter to 'script', which results in the response text being executed as script: not what you want happening to CSS. Brandon's post is the correct method for this. rob On 4/5/07, Pedro Lu

[jQuery] Re: .getScript()

2007-04-04 Thread Brandon Aaron
Not it doesn't but one could create a .getCSS ... maybe something like this (untested). jQuery.getCSS = function( url, media ) { jQuery( document.createElement('link') ).attr({ href: url, media: media || 'screen', type: 'text/css',

[jQuery] Re: .getScript()

2007-04-04 Thread Pedro Luz
Hi, Yes you can load css using $.getScript(); $.getScript("css/standard.css"); On Apr 5, 12:49 am, Ariel Jakobovits <[EMAIL PROTECTED]> wrote: > the docs say this retrieves javascript files. does it retrieve and load CSS?