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 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 return false isn't preventing the return data from being injected > > in to #folders. > > > $('#folders').load("../"+myModule+"/"+navTitle+"/folders/ > > index.php", function(e){ > > console.log(e); > > $('#folders').replaceWith(e); > > return false; > > }); > > > does anyone know of a way to do this? > > .load is actually a wrapping function for .get. You can use .get or even > .ajax for more control. > > -- > Donny > Kurniahttp://blog.abifathir.comhttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia