Hi,
I have the following script to load different xml files, but the load process only works in FF and no other browser. I am particularly interested in IE.
any ideas why?
I have attached all files to this ticket.
Here is (part of) my code in the JS file:
function loadXMLDoc(url)
{
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",url,false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
setPDF(url);
}
and the code in the html file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Horizontal Panel Sliding With animate() function</title>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2'></script>
<script type='text/javascript' src='js/easing.js'></script>
<script type='text/javascript' src='js/xmldata.js'></script>
<script type="text/javascript">
$(document).ready(function() {
$("a#controlbtn").click(function(e) {
// $("a#controlbtn").mouseover(function(e) {
e.preventDefault();
var slidepx=$("div#linkblock").height() + 1;
if ( !$("div#linkblock").is(':animated') ) {
if (parseInt($("div#linkblock").css('marginBottom'), 0) < 0) {
$(this).removeClass('close').html('Hide results');
margin = "+=" + slidepx;
} else {
$(this).addClass('close').html('Show results');
$("div#text_content").addClass('hideMe');
margin = "-=" + slidepx;
}
$("div#linkblock").animate({
marginBottom: margin
}, {
duration: 'slow',
easing: 'easeOutQuint'
});
}
});
});
</script>
<script type="text/javascript">
window.onload=function init(){
loadXMLDoc("paper1.xml");
get_set_Data();
scan();
scanForXML();
highlite();
}
</script>
<link rel="stylesheet" href="styles/styles-pr2b.css" type="text/css" />
</head>
<body >
<!--button onClick="loadXMLDoc('papers.xml')">Get XML External</button>
<button onClick="loadXMLDoc('paper2.xml')">Get XML Local</button-->
<div id="wrap">
<div id="maincontent">
<div id="header">
<h1> title </h1>
<h6> author </h6>
<div id="search">
<input name="search" type="text" value="tablet pc" />
<a href="javascript:void($('#highlight-plugin').removeHighlight().highlight('tablet pc'));">search</a> </div>
</div>
<!--header ends here-->
<!--LinkBlock begins-->
<div id="linkblock">
<div id="control"> <a id="controlbtn" class="open" href="#" alt="Show/View Results">Hide results</a> </div>
<div id="text_content">
<h4>Search Results</h4>
<ol id="results_list">
<li id="paper1.xml">
<a class="tooltip" href="#">Teaching with Tablet PC's
<span class="classic">
<strong>Abstract</strong><br />
Tablet PC's are traditional notebook computers with the ability to process
digital ink by writing with a stylus. They have recently attracted attention as
a potential tool for educational use. </span>
</a>
</li>
<li id="paper2.xml">
<a class="tooltip" href="#">Tablet PC’s as Instructional Tools or the Pen is Mightier than the Board!
<span class="classic">
<strong>Abstract</strong><br />
Tablet PC’s have several unique features that lend themselves nicely to the academic environment—both for faculty use and for student use. Faculty in the College of Technology at the University of Houston have used Tablet PC’s (TPCs) for the past year. </span>
</a>
</li>
<li id="paper3.xml"> <a href="#" class="tooltip">Learning in CS1 via Tablet-PC-based In-Class Assessment
<span class="classic"> <strong>Abstract</strong><br />
This paper describes two pilot studies, one completed and one ongoing, that evaluate the use of Tablet PCs and a Tablet-PC- based classroom presentation system in an introductory computer science class.
</span>
</a>
</li>
<li id="paper4.xml"> <a href="#" class="tooltip">Experiences with a Tablet PC Based Lecture Presentation System in Computer Science Courses
<span class="classic"> <strong>Abstract</strong><br />
Computer science instructors frequently teach using slides displayed with a computer and a data projector. This has many advantages, e.g., ability to present prepared materials and ease of switching the display to a development environment during mid- presentation.
</span>
</a>
</li>
<li id="paper5.xml"> <a href="#" class="tooltip">Preliminary Experiences with a Tablet PC Based System to Support Active Learning in Computer Science Courses
<span class="classic"> <strong>Abstract</strong><br />
There has been much research on the benefits of active and collaborative learning and on its use in computer science courses. As classroom technology becomes more prevalent it is natural to develop systems that support the use of these techniques.
</span>
</a>
</li>
<li id="paper6.xml"> <a href="#" class="tooltip">Analyzing the efficacy of using digital ink devices in a learning environment <span class="classic"> <strong>Abstract</strong><br />
There has been increased interest on the impact of mobile devices such as PDAs and Tablet PCs in introducing new pedagogical approaches and active learning experiences. We propose an intelligent system that efficiently addresses the inherent subjectivity in student perception of note taking and information retrieval.</span> </a> </li>
</ol>
</div>
</div>
<!--LinkBlock ends-->
<script type="text/javascript" src="js/jquery.highlight-3.js"></script>
<!--PosterBlock begins-->
<div class="posterblock" id="highlight-plugin">
<!--column1 div begin-->
<div class="column1">
<div id="abstract" class="preview_box">
<a href="#b0">
<div id="text_content"> blabla </div>
</a>
</div>
<div id="headings" class="preview_box">
<div id="text_content"> </div>
</div>
</div>
<!--column1 div ends-->
<!--column2 div begins-->
<div class="column2">
<div id="download"> <a id="pdfLink" href="#" target="_new"><img src="images/pdf.png" /></a></div>
<h2>Click on a container to view content here</h2>
<div class='box' id='b0'> Abstract</div>
<div class='box' id='b1'> introduction </div>
<div class='box' id='b2'> you hooo </div>
<div class='box' id='b3'> b3 content </div>
<div class='box' id='b4'> b4 content </div>
<div class='box' id='b5'> b5 content </div>
<div class='box' id='b6'> </div>
<div class='box' id='b7'> </div>
<div class='box' id='b8'> </div>
<div class='box' id='b9'> </div>
<div class='box' id='b10'> </div>
<div class='box' id='b11'> </div>
</div>
<!--column2 div ends-->
<!--column3 div begins-->
<div class="column3">
<div id="introduction" class="preview_box">
<a href="#b1">
<div id="text_content"> link b1 </div>
</a> </div>
<div id="conclusion" class="preview_box">
<a href="#b10" id="blabla">
<div id="text_content"> link b2 </div>
</a> </div>
</div>
<!--column3 div ends-->
</div>
<!--posterblock div ends-->
</div>
<!--maincontent div ends-->
</div>
<!--wrap div ends-->
</body>
</html>
Any help will be appreciated - thanks!