Jump to content

XML hyperlinks not appearing


amycwoods

Recommended Posts

I have a sortable table with XML data. The problem is that the text is appearing but not the hyperlinks. I am a newbie, and would really appreciate help. Happy Holidays!Sample of XML file: ----------------------------------<?xml version="1.0" encoding="ISO8859-1"?><?xml-stylesheet type="text/xsl" href="mon_thurs.xsl"?><?xml-stylesheet type="text/css" href="mon_thurs.css" ?><VENUES> <VENUE> <NAME VALUE="http://www.lastdaysaloon.com/santa%20rosa/calendar.html">The Last Day Saloon</NAME> <DATE>02/01/11</DATE> <DAY>Tues</DAY> <TIME>8:00 PM</TIME> <LOCATION>Santa Rosa</LOCATION> <MAIN_ACT>Frank Hannon</MAIN_ACT> <GENRE>Rock</GENRE> <COST>$15.00</COST> </VENUE> <VENUE> <NAME VALUE="http://www.lastdaysaloon.com/santa%20rosa/calendar.html">The Last Day Saloon</NAME> <DATE>02/02/11</DATE> <DAY>Wed</DAY> <TIME>8:00 PM</TIME> <LOCATION>Santa Rosa</LOCATION> <MAIN_ACT>BB King</MAIN_ACT> <GENRE>Blues</GENRE> <COST>$18.00</COST> </VENUE> </VENUES>Sample of HTML page: -------------------<html><head><link href="mon_thurs.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="scripts/jquery-1.4.4.js"></script><script type="text/javascript" src="scripts/jquery.tablesorter.js"></script><title>Monday thru Thursday Shows</title><script>$(document).ready(function(){getTableXml();$("#myTable").tablesorter({debug:true});});function getTableXml() {var tableUrl = 'mon_thurs.xml';$.ajax({url: tableUrl,dataType: ($.browser.msie) ? "text" : "xml",processData: false,success: processXml,error: processError});function processXml(data){var xml;if (typeof data == "string") {xml = new ActiveXObject("Microsoft.XMLDOM");xml.async = false;xml.loadXML(data);} else {xml = data;}$(xml).find('VENUE').each(function(){var date = $(this).find('DATE').text();var day = $(this).find('DAY').text();var time = $(this).find('TIME').text();var name = $(this).find('NAME').text();var location = $(this).find('LOCATION').text();var mainact = $(this).find('MAIN_ACT').text();var genre = $(this).find('GENRE').text();var cost = $(this).find('COST').text();$('<tr></tr>').html('<td>' + date + '</td><td>' + day + '</td><td>' + time + '</td><td>' + name +'</td><td>' + location + '</td><td>' + mainact + '</td><td>' + genre + '</td><td>' + cost + '</td>').appendTo('table');});$('#myTable').trigger("update");}function processError(xhr, ajaxOptions, thrownError){alert(xhr.responseText);alert(xhr.responseXML.childNodes[1].children[0].childNodes[0].wholeText);alert(xhr.getAllResponseHeaders());// alert(ajaxOptions);// alert(thrownError);}}</script></head><body><div id="monThurs"><div id="mthlist"><table id="myTable" class="tablesorter"><thead><tr><th> DATE</th><th> DAY</th><th> TIME</th><th> VENUE</th><th> LOCATION</th><th> MAIN ACT</th><th> GENRE</th><th> COST</th></tr></thead><tbody></tbody></table></div></div></body></html>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...