Hi everyone,
I have a problem with a component. Within a view, I load a component with 
the LOAD function of web2py.

//--------- a_view.html ----------------------------------------------------
{{=LOAD(f='phone_numbers.load',args=('profile'),vars=dict(user_id=auth.user_id),
 
ajax=True, target="phone_number_component")}}

It is working the first time the page is loaded (as it's suppose to be). In 
the component, I generate with a loop some A tags with the helper to 
refresh the component with different parameters for each A. 

//------------------ phone_numbers.load -----------------------------
{{for phone_number in phone_numbers:}}
    {{=A(I('',_class='icon-edit'), _class='btn btn-mini pull-right', 
_href=URL(c='default',f='phone_numbers.load',args=request.args, 
vars=dict(request_modify_phone_id=phone_number.id)), cid=request.cid)}}
{{pass}}

The thing is, when I click on the a tag, it calls web2py_component() with 
the correct parameters but nothing happens. I debugged with firebug 
web2py_component and I found that after the component loaded the first 
time, it jumps over the jQuery(function( ... ){}); within 
web2py_component(); the other times.

//------- web2py.js -------------------------------------------------------
function web2py_component(action, target, timeout, times){
  jQuery(function(){                                     <---- JUMPS OVER 
THAT 
    var jelement = jQuery("#" + target);
    var element = jelement.get(0);
    ....

Is there somthing I'm missing to reload properly my component?

I tried to call web2py_component() manually with the click event of the A 
tag, but same thing happened.

Charles
Web2Py version 2.5.1

-- 

--- 
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