I not sure it safe or not, but it surely not portable... let say you app is
not at port 8000...

use web2py to build you url using URL() helper and you just have to assign
the output of URL() to a js var something like that :

var url = {{=URL(c=controller, args=args, vars=vars)}}

then

source: {url: url},
...

Richard

On Mon, Jun 13, 2016 at 4:27 PM, Alex Glaros <alexgla...@gmail.com> wrote:

> the only way I could get fancyTree to work was with "source url" parmeter
> below. Is that a safe way to create a url and send it a dict item?
> (Crontroller view_tree works with: request.get_vars.specificTaxonomyFK)
>
> // Initialize Fancytree
> $("#alexTree").fancytree({
> checkbox: true,
> selectMode: 3,
> source: {url: "
> http://127.0.0.1:8000/ES3/default/view_tree.json/?specificTaxonomyFK={{=specificTaxonomyFK}}
> "},
> dataType: "json",
> postProcess: function(event, data){
> data.result = convertData(data.response);
> },
> select: function(event, data) {
> window.open(data.node.data.alexLink, "_blank");
> }
> });
>
> thanks
>
> Alex Glaros
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to