This doesn't work:
-----------
# default controller
def play():
  return dict()
def echo():
  import random
  return "jQuery('#target').html('%s');" % DIV(random.randint(1,100))

# default view
{{extend 'layout.html'}}
<div id="target">this is a test</div>
{{=A(T('TEST'),_href='#',_class='title',_onclick="ajax('echo',
['name'],':eval')")}}
---------
But if I change the default view to the following, both links work
when I click on them:

# default view
{{extend 'layout.html'}}
<div id="target">this is a test</div>
<a href="#" id="name" class="title"
   onclick="ajax('echo',['name'],':eval')" >test</a>
{{=A(T('TEST'),_href='#',_class='title',
  _onclick="ajax('echo',['name'],':eval')")}


Also, this works, too, when I have just the <a href="#" ... </a> link
and no helper.

# default view
{{extend 'layout.html'}}
<div id="target">this is a test</div>
<a href="#" id="name" class="title"
   onclick="ajax('echo',['name'],':eval')" >test</a>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to