You can use Utils.parseRemoteDocument() to do this. Try something like the following snippet in your preview() function:
var url = "http://whatever.com/"; function showMyPreview(document) { pblock.innerHTML = jQuery("#myid", document).html(); } function showError() { pblock.innerHTML = "Bad thing happened!"; } Utils.parseRemoteDocument(url, null, showMyPreview, showError) Hope that helps. - Blair On 30/01/2009 10:12 AM, amau96 wrote: > I forget the question > > I don't want to load the full page, but only the main table, can I > parse the responseText or only selc a div or something? > > > > > On Jan 29, 4:11 pm, amau96<[email protected]> wrote: >> CmdUtils.CreateCommand({ >> name: "ll", >> icon: "http://thepiratebay.org/favicon.ico", >> author: { name: "amau", email: "[email protected]"}, >> license: "GPL", >> description: "A speed way to pirate bay", >> help: "just enter the name", >> takes: {"input": noun_arb_text}, >> preview: function( pblock, input ) { >> pblock.innerHTML = "Search on The Pirate Bay for : " + input.text; >> >> jQuery.get("http://thepiratebay.org/search/"+ input.text+"/0/9/0", >> null, >> function (responseText, textStatus, request) >> { >> pblock.innerHTML = responseText; >> } >> ); > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ubiquity-firefox" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ubiquity-firefox?hl=en -~----------~----~----~----~------~----~------~--~---
