Say I want to return a HTML code snippet, just like: <li>A list</li>.
And I want to inert it to an element. But it's a text. So how to
insert it to an element?

I thought the way:

1. Only return "A list" , and say it'll be returned in response.html, and do :

var item = Element('li');
item.set('html', response.html);
target.grab(item, 'top);

But I don't like this very much.

2. Still return the whole HTML code "<li>A list</li>", and do:

target.set('html', response.html+target.get('html'));

I don't know which is the simple and best way, and are there other
ways to do what I want?

Thanks.

-- 
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliWeb <<simple web framework>>: http://uliwebproject.appspot.com
My Blog: http://hi.baidu.com/limodou

Reply via email to