Well, we're *almost* there! The submit() isn't submitting; at least, I'm 
not getting through form.accepts().


On Tuesday, 18 February 2014 15:20:52 UTC-5, Richard wrote:
>
> So remove button[type=submit] in 
>
> $("button[type=submit]#ButtonSubmitId").hide();
>
> $("#ButtonSubmitId").hide();
>
> Should work with only the tag id
>
> Richard
>
>
> On Tue, Feb 18, 2014 at 3:05 PM, horridohobbyist 
> <horrido...@gmail.com<javascript:>
> > wrote:
>
>> It's not working. I get the alert() messages, but the button methods 
>> aren't doing anything.
>>
>> I inserted "_id='fred'" in the INPUT(_type='submit',...) call. I presume 
>> "button[type=submit]#fred" should correctly reference the object?
>>
>>
>> On Tuesday, 18 February 2014 10:19:54 UTC-5, Richard wrote:
>>
>>> <script type="text/javascript" charset="utf-8">
>>>     $(document).ready(function() {
>>>         $("input#YourSelectFieldId").focus(); // not required
>>>         $("button[type=submit]#ButtonSubmitId").hide();
>>>         $('form select[name=YourSelectFieldId]').on('change', 
>>> function() {
>>>             //alert($('select[name=YourSelectFieldId] 
>>> option:selected').val()); // For testing
>>>             $("button[type=submit]#ButtonSubmitId").submit();
>>>             });
>>>     });
>>> </script>
>>>
>>>
>>> On Tue, Feb 18, 2014 at 7:24 AM, horridohobbyist 
>>> <horrido...@gmail.com>wrote:
>>>
>>>> I have a SQLFORM.grid that allows the user to select a query from a 
>>>> selection of queries. The user selects the query using this form:
>>>>
>>>> FORM(TABLE(TR(T("Choose Category:"),SELECT([my_list],_
>>>> name='category',value=current)),
>>>>            TR("",INPUT(_type='submit'))))
>>>>
>>>> The grid is:
>>>>
>>>> SQLFORM.grid(query,
>>>>     orderby=db.products.category,
>>>>     csv=False)
>>>>
>>>> I would like the user to not have to click on a submit button. I just 
>>>> want to have some action that will modify the grid query as soon as the 
>>>> selection is made. What's the best way to do this? (I can think of a very, 
>>>> very messy way, but I'd like to avoid that.)
>>>>
>>>> Thanks.
>>>>
>>>> -- 
>>>> Resources:
>>>> - http://web2py.com
>>>> - http://web2py.com/book (Documentation)
>>>> - http://github.com/web2py/web2py (Source code)
>>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to web2py+un...@googlegroups.com.
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to