Bummer, still not working. Thanks for the help though.
On Aug 15, 11:32 am, "comslash.com" <comsl...@gmail.com> wrote: > Not sure ... I have never tired that ... but you could try, to parse > it in the same way i would parse an xml document, with something like > this. > > $.ajax({ > url: 'http://www.examplepage.com', > success: function(responseHTML) { > var someText = $('#One', responseHTML).html(); > }, > dataType: 'html' > }); > > On Aug 15, 9:45 am, nick <nboutel...@gmail.com> wrote: > > > > > Thanks, but its actually a full webpage im returning. Is there a way > > of only returning the section of html I want, similar to > > load('http://www.examplepage.com#one')? > > > On Aug 15, 12:07 am, "comslash.com" <comsl...@gmail.com> wrote: > > > > I don't think you can ignore this error ... It looks like you are > > > returning a JSON response, try turning data type to json and then > > > insert responseHTML.One into your find command ... as "One" is your > > > object ... see below. > > > > $.ajax({ > > > url: 'http://www.examplepage.com', > > > success: function(responseHTML) { > > > var someText = $(responseHTML.One).find('#myDiv').html(); > > > // you may need $('#'+responseHTML.One) ... if you are looking for > > > say an id ... or "." + ... if its a class > > > }, > > > dataType: 'json' > > > > }); > > > > On Aug 14, 9:20 pm, nick <nboutel...@gmail.com> wrote: > > > > > $.ajax({ > > > > url: 'http://www.examplepage.com', > > > > success: function(responseHTML) { > > > > var someText = $(responseHTML).find('#myDiv').html(); // This part > > > > returns a script error and aborts anything else from here > > > > }, > > > > dataType: 'html' > > > > > }); > > > > > The problem is that examplepage.com has a script error > > > > > (Syntax error, unrecognized expression: {"One":"1") > > > > > that is messing up anything that searches responseHTML. How can I > > > > ignore this error because all I need is a section of html that is not > > > > affected by the errant script.