This is a migrated thread and some comments may be shown as answers.

Endless Scrolling: Invalid template: <a href ...</a>

0 Answers 64 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 24 Oct 2012, 11:20 AM
Hi everyone!

I have this endless scrolling component but in my case I want to make every <li> clickable, so i designed this template:

...
<script id="endless-scrolling-template" type="text/x-kendo-template">
<a href="#overview-account">
<div id="parent">
   <div class="img-div">
<img src="../../content/mobile/overview/nairobi.jpg" />
</div>
<div class="name-div">random_string</div>
<div class="url-div">random_string</div>
<div class="dist-div">random_string</div>
</div>
</a>
</script>

But when the page is rendered nothing is displayed...


If I remove the <a tag like this:
...
<script id="endless-scrolling-template" type="text/x-kendo-template">
<div id="parent">
   <div class="img-div">
<img src="../../content/mobile/overview/nairobi.jpg" />
</div>
<div class="name-div">random_string</div>
<div class="url-div">random_string</div>
<div class="dist-div">random_string</div>
</div>

...everything is ok but the elements are not clickable :/

This is the exception:
Thank you all!

Uncaught Error: Invalid template:'<li data-uid="#=uid#"> <a href="#overview-account"> <div class="parent"> <div class="img-div"> <img src="../../content/mobile/overview/nairobi.jpg" /> </div> <div class="name-div">random_string
</div> <div class="url-div">random_string
</div> <div class="dist-div">random_string
</div> </div> </a> </li>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<li data-uid="'+(uid)+'">\n <a href="';overview-account"> <div class="parent"> <div class="img-div"> <img src="../../content/mobile/overview/nairobi.jpg" /> </div><div class="name-div">random_string
</div><div class="url-div">random_string
</div> <div class="dist-div">random_string
</div> </div> </a> </li>;o+=;}return o;'


No answers yet. Maybe you can help?

Tags
ListView (Mobile)
Asked by
David
Top achievements
Rank 1
Share this question
or