[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread Liam Potter
$.load(../+myModule+/+navTitle+/folders/index.php, function(e){ console.log(e); $('#folders').replaceWith(e); return false; }); try that robing wrote: I don't know if this is possible or not but i would like to use the .load method to return the

[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread robing
Hi Liam, i got $.load is not a function, any other suggestions?? On Jul 29, 9:57 pm, Liam Potter radioactiv...@gmail.com wrote:        $.load(../+myModule+/+navTitle+/folders/index.php, function(e){             console.log(e);             $('#folders').replaceWith(e);             return

[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread Liam Potter
then I'd say use the ajax function. http://docs.jquery.com/Ajax/jQuery.ajax#options robing wrote: Hi Liam, i got $.load is not a function, any other suggestions?? On Jul 29, 9:57 pm, Liam Potter radioactiv...@gmail.com wrote: $.load(../+myModule+/+navTitle+/folders/index.php,

[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread robing
Thanks Donny, $.get(../+myModule+/+navTitle+/folders/index.php, function (data){ $('#folders').replaceWith(data); //return false; },html); works for me. On Jul 29, 10:15 pm, Donny Kurnia donnykur...@gmail.com wrote: robing wrote: I don't know if this

[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread Donny Kurnia
robing wrote: I don't know if this is possible or not but i would like to use the .load method to return the contents of a file but not inject the code in to the dom because i want to use .replaceWith ( returnedLoadData ). here is what i have tried so far and i can return the data to e but the

[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread Liam Byrne
Surely $(#folders).replaceWith will actually do the - er - replacing ? L Liam Potter wrote: $.load(../+myModule+/+navTitle+/folders/index.php, function(e){ console.log(e); $('#folders').replaceWith(e); return false; }); try that robing

[jQuery] Re: can i use .load to return HTML but not inject in to dom?

2009-07-29 Thread Liam Byrne
Try using $.get - it'll return the data From http://docs.jquery.com/Ajax/load : .load : Load HTML from a remote file and inject it into the DOM. HOWEVER : .get : Load a remote page using an HTTP GET request. $.get(../+myModule+/+navTitle+/folders/index.php, { OPTIONAL PARAMETERS HERE },