Sigh.... it was the apostrophes around the XML statement. 

Sorry about that guys I didn't realize I didn't need the ' enclosures...

On Thursday, June 12, 2014 10:11:58 AM UTC-4, LoveWeb2py wrote:
>
> Hello,
>
> I'm trying to pass a variable which has json data into infovis for a 
> visualization
>
> It's interesting because when I type {{=XML(data)}} in the view I can see 
> the correct json data is being passed, but when I edit the .js file and try 
> to include the variable there nothing happens (it says undefined).
>
> Here is what i'm creating: 
> http://philogb.github.io/jit/static/v20/Jit/Examples/ForceDirected/example1.html
>
> If you click on example code you'll see they have json already defined 
> there in the , but I want to pass the json as a variable to the js file.
>
> When I copy and paste the json code from my view and paste it directly 
> into the .js it works fine, so I'm thinking I'm not passing the variable 
> properly.
>
> I've tried {{=XML(data)}} with and without quotes, and still the same 
> result.
>
> Any help is greatly appreciated!
>
>
>

-- 
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