SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jun 2012
    0 Post(s)
    0 Thread(s)

    importing xml files in html - does not work in IE

    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();
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

    and the code in the html file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Horizontal Panel Sliding With animate() function</title>
    <script type='text/javascript' src=''></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) {
            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');
          			margin = "-=" + slidepx;     		
            		marginBottom: margin
          		}, {
                        duration: 'slow',
                        easing: 'easeOutQuint'
    <script type="text/javascript">
    window.onload=function init(){
    <link rel="stylesheet" href="styles/styles-pr2b.css" type="text/css" />
    <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>
        <!--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> 
              <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> 
              <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.
              <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. 
              <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.  
              <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>
        <!--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>
            <div id="headings" class="preview_box">
              <div id="text_content"> </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>
          <!--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>
          <!--column3 div ends--> 
        <!--posterblock div ends--> 
      <!--maincontent div ends--> 
    <!--wrap div ends-->
    Any help will be appreciated - thanks!
    Last edited by TechnoBear; Jul 10, 2012 at 04:39. Reason: Code tags added


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts