Hi,

I am trying to get a set of list items that if clicked or the mouseover 
event occurs, it updates another div element. I started with that chapter 
11 echo example:

***** default/index.html: ****

{{extend 'layout.html'}}
<!--form>
    <input name="name" onkeyup="ajax('echo', ['name'], 'target')" />
</form-->

**** default.py *****

def index():    
    return dict()
    
def echo():
    return request.vars.name

... and this DOES WORK OK.


So I tried to do something similar but for an unordered list / items, and 
it calls the correct function but does not pass the 2nd argument through to 
it. It does update the correct target div though.

Here is my updated default/index.html code that does not work:

{{extend 'layout.html'}}
<ul>
    <li id="id" onclick="ajax('echo', ['id'], 'target')" >ICC</li>
</ul>

Can you tell me why the id does not pass to the echo function. Sorry if 
I've missed something obvious, I am new to web2py and javascript.

Ann


-- 



Reply via email to