I tried to implement a template in external file, but realized that it
does not matter whether
I use template file or crete template in JS - it does not work inside
Ubiquity preview window
for some reason.

I have published my commands at http://svd.at.tut.by/nozbe.html, the
sources are available
at http://github.com/svd/ubiquity-commands/tree/master

Particularly, the version with template in a separate file is
available in separate branch
here: http://github.com/svd/ubiquity-commands/tree/template-file. I
have a test checkbox
in http://github.com/svd/ubiquity-commands/tree/template-file/nozbe-list.html,
onchange event is
calling javascript function defined in the same file. If I open this
file in a browser directly, the
javascript finciton works, but if I use it ubiquity preview window -
it complains about unknown
function.

Does anybody have any ideas about why this happens?

On Dec 1, 8:20 pm, "Douglas Nogueira" <[email protected]>
wrote:
> Take a look in the command "map", he defines a html template for the preview
> (map.html).
> I hope that helps!
>
> ----
> Doug
>
> 2008/11/29 svd <[email protected]>
>
>
>
> > Hello,
>
> > I'm trying to make a new command which displays some data in preview
> > panel, and I'd like to have it "dynamic". Particularly, I have some
> > check boxes there and I need to perform some actions when checkbox
> > state is changes. I have something like this:
>
> > var text = "<input type='checkbox' onchange='myFunction();'/>
>
> > I have myFunction() defined in the Ubiquity's command editor, but it
> > is not accessible from the preview panel. Is it possible to access it
> > somehow?
>
> > I could assume that it is possible to define html template for the
> > preview and have JS function identified there, but I would like to
> > reuse code from the commands and do not want to have it duplicated.
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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