This is the definition of web2py_component

function web2py_component(action,target)
{
    jQuery(document).ready(function()
{ web2py_ajax_page('get',action,null,target); });
}

I think you just want to call web2py_ajax_page instead of
web2py_component.

On May 16, 11:50 pm, Jason Lotz <jayl...@gmail.com> wrote:
> I was using an iframe to show the details of a selected row from
> jqgrid. Which worked. However I realized that it is a pain to get
> iframe to recognize parent size so resizing produces an awkward
> looking form. I came across web2py LOAD helper and thought it to be a
> good fix to my frame resizing issue.
>
> I'm trying to change a LOAD(form) based on the row_id from a selected
> row in jqgrid. Using the jqgrid event onSelectRow I'm trying to
> trigger web2py_component to reload the form.
>
> I came up with a test link to update the form, which worked.
>
>    <a href="#"
> onclick="web2py_component('{{=URL(...)}}','my_form');">Load Page 3</a>
>    {{=LOAD('default','a_form/1',ajax=True,target='my_form')}}
>
> If possible I would like to get jqgrid to trigger the same
> web2py_component feature.
>
> My latest failed attempt was something like
>
> jQuery(document.ready(function(){
>     onSelectRow: function()
> { jQuery("#my_form").trigger('web2py_component',['/Test/default/
> a_form/'+(postdata),'my_form']);}
> ;})
>
> Is it possible to trigger web2py_component function or LOAD helper
> without an action input (button or link)?
>
> Jay

Reply via email to