Thanks for your answer,
I have try this :
/* This is a template command */
CmdUtils.CreateCommand({
  name: "example",
  icon: "http://example.com/example.png";,
  homepage: "http://example.com/";,
  author: { name: "Your Name", email: "[email protected]"},
  license: "GPL",
  description: "A short description of your command",
  help: "how to use your command",
  takes: {"input": noun_arb_text},
  preview: function( pblock, input ) {
jQuery.get("http://thepiratebay.org/search/"+ input.text+"/0/9/0",
null,
 function (responseText, textStatus, request) {
   myText = jQuery("#searchResult", responseText).html();
   pblock.innerHTML = myText+"lol";
 }, "html");


  },
  execute: function(input) {
    CmdUtils.setSelection("You selected: "+input.html);
  }
});


But, I expected to get the table in the response, but I only get the
content of the table, you can try the command and enter "linux" for
exemple.
The probleme is that the response is not formated like a table, that
make something impossible to read







On Jan 30, 2:42 am, Alberto Santini <[email protected]> wrote:
> On Jan 29, 10:12 pm,amau96<[email protected]> 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?
>
> In the jQuery callback you can use again jQuery:
>
> jQuery.get("http://thepiratebay.org/search/"+ input.text+"/0/9/0",
> null,
>   function (responseText, textStatus, request) {
>     myText = jQuery(".mytable", responseText). ...
>     pblock.innerHTML = myText;
>   }, "html");
>
> Regards,
> Alberto
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to