Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9020 closed bug (invalid)

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:


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">


<a href="${Name}" alt="${Name}">${Name}</a> ${Address}



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)

Change History (3)

comment:1 Changed 12 years ago by jocapc

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".

comment:2 Changed 12 years ago by Rick Waldron

Component: unfiledweb
Priority: undecidedlow
Resolution: invalid
Status: newclosed

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.

Last edited 12 years ago by Rick Waldron (previous) (diff)
Note: See TracTickets for help on using tickets.