Little trick if you need to reference the same value later -- <span id="var1" var1 = "745"></span>
Using unique id's, jQuery makes it very easy to manipulate/reference the contents. Not exactly XHTML compliant however. On Jun 18, 11:00 am, Alexey Nezhdanov <snak...@gmail.com> wrote: > On Thursday 18 June 2009 19:38:43 Yannick wrote: > > > Hello Mate, > > I have a little problem here and not sure if it is even possible to do > > so... > > I was wondering if you know how to access javascript value in the > > web2py python code from the view.... > > > Here I'm trying to add a parameter to my URL and the value of that > > param is a Javascript variable > > > ################## > > <script> > > .... > > var param = 'value' > > > .... {{URL(r=request,c='static',f='action', args=[param])}} > > > ..... > > </script> > > ################## > > > This code gave me an error because the variable "param" is not defined > > which is normal... > > Do you know a way to get a param's value and put it as an argument to > > my URL ?? > > URL() is executed when generating page on server. > and param=... gets assigned _later_ when executing _already_generated_page_. > > You can try though: > {{param='value'}} > var param={{=param}} > > > Thanks for your help... > > > Cheers, > > Yannick P. > > -- > Sincerely yours > Alexey Nezhdanov --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---