Side navigation
#9020 closed bug (invalid)
Opened April 29, 2011 07:25PM UTC
Closed April 29, 2011 07:38PM UTC
Last modified April 29, 2011 07:42PM UTC
tmpl() function does not populate href attribute in a tag in FF 3.6.16 64-bit
Reported by: | jocapc | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | web | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have tried to use tmpl() function and it seems that it does not populate href attribute of the a tag in FireFow on 64-bit Windows7.
I have included following libraries:
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
In the HTML is placed following code as a template:
<ul id="template">
<li>
<a href="${Name}" alt="${Name}">${Name}</a>
${Address}
</li>
</ul>
In the document ready is placed following code:
var markup = $("#template").html();
$.template("template", markup);
var data = [{ Name: "The name 1", Address: "The address 1"},
{ Name: "The name 2", Address: "The address 2"}];
var output = $.tmpl("template", data);
$("#template").html(output);
Results is:
<ul id="template">
<li>
<a alt="The name 1" href="${Name}">The name 1</a> The address 1</li>
<li><a alt="The name 2" href="${Name}">The name 2</a> The address 2
</li>
</ul>
Alt attribute is populated but href is not. Note that it works fine in the Google Chrome and IE8 (64bit)
Attachments (0)
Change History (3)
Changed April 29, 2011 07:34PM UTC by comment:1
Changed April 29, 2011 07:38PM UTC by comment:2
_comment0: | According to the big red box displayed on the new tickets page: \ \ <div class="ticket-guidelines"><h2 id="Areyouintherightplace">Are you in the right place?</h2> \ <p> \ <strong>For Official jQuery Plugins (<a class="ext-link" href="http://github.com/jquery/jquery-tmpl/issues"><span class="icon"> </span>Templating</a>, <a class="ext-link" href="http://github.com/jquery/jquery-datalink/issues"><span class="icon"> </span>Data Linking</a>, <a class="ext-link" href="https://github.com/jquery/jquery-global/issues"><span class="icon"> </span>Globalization</a>):</strong><br /> \ This is NOT the correct form! Please use the Issue Tracker on the GitHub repository for each plugin, linked above. \ </p> \ </div> → 1304105978670736 |
---|---|
component: | unfiled → web |
priority: | undecided → low |
resolution: | → invalid |
status: | new → closed |
According to the big red box displayed on the new tickets page:
For Official jQuery Plugins ( Templating, Data Linking, Globalization):
This is NOT the correct form! Please use the Issue Tracker on the GitHub repository for each plugin, linked above.
You can see this in jsfiddle. When it is opened in FireFox 3.6.16, ${Name} is left in href attribute but in IE8 and Chrome this value is replaced with a "The name 1" and "The name 2".