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;
<script>
$("#myfield").valudate(number);
</script>
On 6/5/11 7:43 PM, Anthony wrote:
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 controller from a regular web
request?
I read the docs it syas response.js is executed only in a component;
so I have a form and I would like to add JS validators.
so I try adding to the response.js =
'$("myfield").validate("digits");'
Of course this only works in component mode as I tried it;
But now I have a single form page and I want this same javascript
to work;
How do I do that?
Thanks.