HTML elements within iterator

1 view
Skip to first unread message

Andrew Midson

unread,
Feb 24, 2008, 1:00:31 PM2/24/08
to Appcelerator Platform SDK
I'm trying to set up an iterator that generates a series of <DIV>
elements, but am having some problems. The documentation suggests that
I should be able to do this:

<app:iterator on="r:test.message.response then execute">
<html:div>#{name}</html:div>
</html:div>#{description}</html:div>
</app:iterator>

My problem is that when I try this I get the following error:

Error loading http://localhost/modules/html_div/html_div.js Exception:
message: Error loading script

If I leave out the <html:div> elements then everything works, but
without any formatting. I cannot find any folders in the modules
folder starting with "html_", so am I missing these or do I have
something wrong with my code?

Regards

Andrew

Hamed Hashemi

unread,
Feb 24, 2008, 1:10:10 PM2/24/08
to appcelerator...@googlegroups.com
Can you make sure you have

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:app="http://www.appcelerator.org">

defined at the top of your document?

nolan...@gmail.com

unread,
Feb 24, 2008, 1:10:44 PM2/24/08
to Appcelerator Platform SDK
you need the "app" namespace defined. add this line to the top of
your html file:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://
www.appcelerator.org">

let me know if this doesn't solve the problem.

Andrew Midson

unread,
Feb 24, 2008, 1:21:17 PM2/24/08
to appcelerator...@googlegroups.com


On 24/02/2008, nolan...@gmail.com <nolan...@gmail.com> wrote:

you need the "app" namespace defined.  add this line to the top of
your html file:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://
www.appcelerator.org">

let me know if this doesn't solve the problem.


That was it. Many thanks for the quick reply.

Regards

Andrew

Tejus Parikh

unread,
Feb 24, 2008, 1:32:34 PM2/24/08
to appcelerator...@googlegroups.com
If this is your code, than the problem might be you have two closing html:div tags in a row. Get rid of the leading slash on the second line and try agian.

Another potential problem is that you might not have the html namespace defined. Tkae alook at the source for our doc, and copy the contents of the html tag.

--Tejus

Reply all
Reply to author
Forward
0 new messages