Yeh, that helped, but I already knew how to post data, just needed to
know that posting data of an array is like "key[]=value1&key[]=value2"
Thanks,
Ofir.

On 21 אוקטובר, 09:42, "Blair McBride" <[EMAIL PROTECTED]> wrote:
> I assume you mean you wish to open a new Tab with the posted data? If
> so, you can use Utils.openUrlInBrowser() - use the 2nd parameter to
> specify POST data. It can be a string representation, JSON (ie, normal
> JavaScript object - but no objects within the JSON!), or an instance
> of nsIInputStream (which is referenced in the article you mentioned).
> The usage is:
>
> Utils.openUrlInBrowser(url, postData);
>
> Unfortunately... Utils.openUrlInBrowser() uses Utils.paramsToString()
> to convert JSON into a string and then into a nsIInputStream. And
> Utils.paramsToString() doesn't support arrays (that's a bug - 
> seehttp://labs.toolness.com/trac/ticket/361). So you'll have to construct
> your own string representation of it. Its exactly the same format as a
> query string at the end of a normal URL of a GET request:
>
> something=somethingelse&key[]=value1&key[]=value2
>
> Hope that helps.
>
> - Blair
>
> On Tue, Oct 21, 2008 at 9:07 AM, ofiras <[EMAIL PROTECTED]> wrote:
>
> > hello,
> > I saw the article:
> >http://developer.mozilla.org/index.php?title=En/Code_snippets/Post_da...
> > But i didn't understund how to post data if I need to post data with
> > multiple selection.
> > For e.g - If i have <select name="data[]"> and then all the options...
> > How do I post multiple selection data?
> > Please help,
> > Ofir.
--~--~---------~--~----~------------~-------~--~----~
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