Then don't use the ajax() function. Instead, create a jQuery event handler
to capture the keyup event. Then, in the handler, grab the input value and
refresh the component by calling:
web2py_component('{{=URL("default", "ajaxTable2.load")}}' + '?count='
+input_value
, 'grid')
In that case, the input value will be available as request.vars.count in
the ajaxTable2 function.
Anthony
On Wednesday, July 25, 2012 12:40:29 AM UTC-4, dave wrote:
>
> The problem is when I filter using input boxes from outside, I need to use
> the ajax function from the view,
> like <input name="id4" type="text" class="input-small" id="input4"
> value="40" onkeyup="ajax('ajaxTable3', ['id4'], 'grid')" />
> , and I do replace the load function which is inside the div grid
> <div id = "grid">
> {{=LOAD('default','ajaxTable2.load',ajax=True, target='grid',
> content='loading...')}}
> </div>
>
> when the first page loads, the links will be trapped, but after the keyup
> fires, the div id grid is replaced by the ajax function, is there another
> way to go about this problem, I tried everything including your solution
> above, but when I click the pagination links the page loads by itself
>
--