Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7764 closed bug (invalid)

HTML tags not processed in IE7 using append instruction

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:


I have this code working fine in IE8 and Firefox, but there is an issue with appending the HTML tags in IE7

	SDataService.prototype.stationData = function (jQ_dataelement) {
		// clear existing rows
		$(" $(jQ_dataelement) > tr").remove();

				  contentType: "application/json; charset=utf-8",
				  success: function (resultData) {
					  if (resultData.Records.length > 0) {
						// append new data 
						$(jQ_dataelement).append ('<tr><td width="200"><b>DATA &nbsp;  TO  :</b> </td><td width="100"><b>LEAVING :  </b></td><td width="150"><b>DELAY :</b></td></tr>')
					for (var i = 0; i < resultData.Records.length; i++) {
						var traininfo = resultData.Records[i];
						var delay = traininfo.DL == null ? "00:00" : traininfo.DL
						//style delay cell if value != 00:00
						var city = (traininfo.ST.N == null || traininfo.ST.N == "") ? "Geen info" : traininfo.ST.N
						var trainInfo = traininfo.ST.U
						var trainHourMatch  =  trainInfo.indexOf("&t=")
						// then perform slice (from match pos)
						var trainHour = trainInfo.substr (trainHourMatch + 3, 5)				
						//add data to DIV						 
						$(jQ_dataelement).append('<tr><td>' + city + '</td><td>' + trainHour + '</td><td>' + delay + '</td></tr>' );
						// style row
						$("tr:odd").css("background-color", "#FF8C04")

					} // end for
				}, // end success
				error: function (e) {
						alert ("Error in TrainStation.getStation data method. Error message : " + e) 
				} // end AJAX				

	} // 

} // end SD class

Change History (3)

comment:1 Changed 12 years ago by danheberden

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

Please submit a valid reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. So that we can investigate this issue further.

Since your problem isn't related to an ajax call, but rather, appending html - it'd be very helpful if you could create the same problem without the ajax request and something we could run on jsfiddle.net

Thanks again!

comment:2 Changed 12 years ago by jitter

Owner: set to anonymous
Status: newpending

comment:3 Changed 12 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.