Still the same issue :( , its not calling record_config() function... how to check whether JQuery is supported or not? I have created my own custom html page without mentioning {{extend 'layout.html'}} statement, means simple html page withe labels and text fields, so do I need to add some statement in my html file to support JQuery?
On Thu, Aug 30, 2012 at 12:40 PM, Anthony <abasta...@gmail.com> wrote: > Replace the single quotes with double quotes inside the jQuery(): > > onClick='window.location="{{=URL('default', 'record_config') + '/'}}" + > jQuery("input[name=name_text_field]").val();' > > The value will be available as request.args(0) in the record_config() > function. > > Anthony > > > On Thursday, August 30, 2012 2:41:40 AM UTC-4, Amit wrote: >> >> Hi Anthony, >> I used the code which you have suggested but it's not working at all, it >> is not calling record_config() function of controller. >> >> <input value="Save" type="button" name="save_button" >> onClick='window.location="{{=**URL('default', 'record_config') + '/'}}" >> + jQuery('input[name=name_text_**field]').val();'> >> >> >> second point is if the above approach is successful then how would I >> retrieve the value in controller side: >> >> def record_config(): >> print 'inside record_config' >> print request.input['name'] >> >> Do I need to use Input list to retrieve the value? OR is there any other >> way to retrieve? >> >> >> On Wednesday, 29 August 2012 19:50:15 UTC+5:30, Anthony wrote: >>> >>> <Button type="button" name ="seeting_button" >>>> onclick = 'window.location="{{=URL('defa**ult', 'record_config', >>>> args=[name_text_field.value])}**}";'> >>>> >>> >>> You cannot refer to name_text_field the way you have. Everything inside >>> {{..}} is Python and must be available on the server before the HTML is >>> rendered and sent to the browser. The input field value is available on the >>> client side and must be retrieved via Javascript. You could do: >>> >>> onclick='window.location="{{=**URL('default', 'record_config') + '/'}}" >>> + jQuery('input[name=name_text_**field]').val();' >>> >>> Anthony >>> >> -- > > > > --