Re: [web2py] Re: response.js on regular requests.

2012-07-17 Thread Richard Vézina
Sorry for the noise, I struggled with """ for long time and didn't realise that I wasn't need "eval()" anymore... I don't need js var and eva(); at all as long as I have XML() # In view {{if request.args(0)=='SOMETHING':}} {{=XML(conditional_field_trigger_selected_event_js)}} {{pass}} Rich

Re: [web2py] Re: response.js on regular requests.

2012-07-17 Thread Richard Vézina
I had to use XML() to avoid $quot; in the view, like this : # In controller conditional_field_trigger_selected_event_js = '$("select[name=FIELDOFINTERESS]").change(function() {var val = $(this).children(":selected").attr("value");$(this).trigger($(this).attr("id") + "__selected", [val]);});' ...

Re: [web2py] Re: response.js on regular requests.

2012-07-17 Thread Richard Vézina
Hello Anthony in order to do what you propose here, I mean passing javascript code from the controller to the view by mean of return dict(var=js), I think the only way I have to execute the passed js code is to use eval in the view like this : eval({{=var}}); Now, my concern is, is that secure

Re: [web2py] Re: response.js on regular requests.

2011-06-06 Thread Ovidio Marinho
you already tried something like that: The actual script is in an external script file called "xxx.js". Ovidio Marinho Falcao Neto ovidio...@gmail.com 88269088 Paraiba-Brasil 2011/6/6 David J. > I tried this it worked

Re: [web2py] Re: response.js on regular requests.

2011-06-06 Thread David J.
I tried this it worked on the fields but it seemed to have disabled the rest of the web2py_ajax javascript; Maybe I am doing something wrong; $("#myfield").valudate(number); On 6/5/11 7:43 PM, Anthony wrote: Can't you just include the relevant JS directly in the view template for the pa

[web2py] Re: response.js on regular requests.

2011-06-05 Thread Anthony
Can't you just include the relevant JS directly in the view template for the page, or maybe include the JS string in the dict returned by the controller, and insert it as a variable in the view? On Sunday, June 5, 2011 6:22:13 PM UTC-4, David J wrote: > How do I inject javascript in my controll