Fancybox not working with HTML/java Driven Content

remixs

New Member
I have a problem that has been bugging me for around 2 days now and seem to be getting low responses elsewhere. I am running XML's that string along the data into AJAX tabs.then using Javascript, to break and only display the XML data where I want, then I want some of the data to appear through a Lightbox which and not on the AJAX tab through the 'read more' hyperlink.Some of the data appears normally however the Lightbox is not working at all, the scripts are loaded and linked correctly but I cannot seem to work out why it is not working. Each Lightbox has been generated through the script and yet, no Lightbox or linking is working correctly. Because some Lightbox's work using similar things as div anchors, it seems to be anchoring instead.For a live version see:http://universitycompare.com/university-guide/london-metropolitan-university/alternatively, the script I have done is below: \[code\]<script type="text/javascript">if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","http://universitycompare.com/wp-content/themes/blue-and-grey/XML/<?php echo the_field('university_xml_courses'); ?>",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML; document.write("<table border='0'>");var x=xmlDoc.getElementsByTagName("KISCOURSE");for (i=0;i<x.length;i++) { document.write("<tr id='CourseArea'><td><h3 id='CourseTitle'>"); // TITLE document.write(x.getElementsByTagName("TITLE")[0].childNodes[0].nodeValue); document.write("</h3>"); document.write("<p class='ForP'>-&nbsp;&nbsp;"); document.write(x.getElementsByTagName("MODE")[0].childNodes[0].nodeValue); document.write("</p><div class='clear'></div>"); // UCAS CODE document.write("<p id='ucascode'>"); document.write("<b>UCAS CODE</b>&nbsp;&nbsp;&nbsp;"); document.write(x.getElementsByTagName("UCASCOURSEID")[0].childNodes[0].nodeValue); document.write("</p>"); // READ MORE LIGHTBOX document.write("<img src='http://universitycompare.com/wp-content/themes/blue-and-grey/images/info-icon.png' width='15' style='margin:0px 2px 0px -4px;'>"); document.write("<a id='various' href='http://stackoverflow.com/questions/12745361/#inline'>Read More</a>&nbsp;&nbsp;&nbsp;"); // VISIT COURSE LINK document.write("<a class='courselink' href='"); document.write(x.getElementsByTagName("CRSEURL")[0].childNodes[0].nodeValue); document.write("' target='_blank'>Visit course website</a>"); document.write("</td></tr>"); // LIGHTBOX INFO document.write("<div class='inline' style='display:none; width:500px; height:500px;'>"); document.write(x.getElementsByTagName("CRSEURL")[0].childNodes[0].nodeValue); document.write("</div>"); }document.write("</table>");</script>\[/code\]
 
Back
Top