Here the code to use a regular drop down and avoid use of autocomplete
plugin dependency.
In controller :
conditional_field_trigger_selected_event_js =
'$("select[name=FIRSTFIELDNAME]").change(function() {var val =
$(this).children(":selected").attr("value");$(this).trigger($(this).attr("id")
+ "__selected", [val]);});'
In view :
<script type="text/javascript">
{{=XML(conditional_field_trigger_selected_event_js)}}
</script>
Richard
On Wed, Aug 29, 2012 at 10:20 AM, Anthony <[email protected]> wrote:
> See https://groups.google.com/d/msg/web2py/z8-jyLTy-_w/0fJ34fL8JysJ.
>
> Anthony
>
>
> On Wednesday, August 29, 2012 6:18:57 AM UTC-4, Amit wrote:
>>
>> Hi,
>> I have to send textfield value from html to controller function, how to
>> achieve it, please see the code below :
>>
>> <input value="Save" type="button" name="save_button"
>>
>> onClick = 'window.location="{{=URL('defa**ult', 'record_config
>> ',args[])}}";'>
>>
>>
>>
>> I have one text field on html page named record name, user can input the
>> name of the record which I want to pass to the record_config() function of
>> default.py but i am unable to do so because if I directly put in args
>> something like this args[record_txt_field.value] it is throwing error
>> saying "name record_txt_field not defined", it seems like we can't use
>> directly text field name inside python code so how to pass the value of
>> text field as an argument to the record_config function.
>>
>> Please help me resolve this issue.
>>
> --
>
>
>
>
--