The button has a href="#mymodal" calling a modal window. What I want is to pass an ID to the modal window. I have a LOAD() in the modal window. so in essence the situation is i have a grid listing with each row a button, then click a button calls a modal window which has a <div id="mp_xx">{{=LOAD('c','a', args='x')}}</div>. Now when a user clicks on the button i want to change the contents of the div using jQuery('#id_xx').html("{{=LOAD('c','a', args=var)}}"). Maybe there is another way of doing this??? Please advise.
On Wed, Apr 17, 2013 at 2:18 PM, Niphlod <niph...@gmail.com> wrote: > are you sure that the button has not yet an event attached that prevents > your "custom" one ? > > > On Wednesday, April 17, 2013 12:15:03 PM UTC+2, software.ted wrote: > >> I have a component am loading in a <div> >> <div id="test"></div> >> {{=A('Link to comp', component=URL('research', 'mycomponent.load'), >> target='setting-content')}} >> >> <div class="span8" id="setting-content"> >> >> </div> >> >> in this same view page i have a <javascript> >> >> <script type="text/javascript"> >> jQuery('#mp_257').click(**function(){ >> jQuery('#test').html('Test') >> //alert("Test") >> }) >> </script> >> >> The component has a button with an id=mp_257, but when i click on it, >> jQuery in the view above is not being executed by replacing the "Text" in >> the div...the component has a grid with a custom button created as follows: >> >> links = [lambda row: A(SPAN(_class='icon-pencil'), 'Personal Details', >> _id = 'mp_257', _class='btn')] >> >> Anything why this is not working? But when I put the button in the view >> using: >> >> {{=A(SPAN(_class='icon-pencil'**), 'Personal Details', _id = 'mp_257', >> _class='btn')}} >> >> All works fine, is there something about loaded component that prevents >> running of javascript in the same page? >> >> -- >> ..............................**..............................** >> ........................... >> Teddy Lubasi Nyambe >> Opensource Zambia >> Lusaka, ZAMBIA >> >> Cell: +260 97 7760473 >> website: http://www.opensource.org.zm >> >> ~/ >> Human Knowledge belongs to the world! - AntiTrust >> >> Man is a tool-using animal. Without tools he is nothing, with tools he is >> all - Thomas Carlyle 1795-1881 >> >> /~ >> > -- > > --- > 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. > > > -- ....................................................................................... Teddy Lubasi Nyambe Opensource Zambia Lusaka, ZAMBIA Cell: +260 97 7760473 website: http://www.opensource.org.zm ~/ Human Knowledge belongs to the world! - AntiTrust Man is a tool-using animal. Without tools he is nothing, with tools he is all - Thomas Carlyle 1795-1881 /~ -- --- 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.