Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with XMLHttpRequest

    I'm starting to learn javascript and trying to get the below code to work with newer browsers. I'm not sure how to implement the below to make it work with XMLHttpRequest. There is a small form that uses this function to allow you to select an xml file to load. Your help is much appreciated. Thanks.

    Code:
    		function importXML() {
    			
    			
    			if (document.implementation && document.implementation.createDocument) {
    				xmlDoc = document.implementation.createDocument("", "", null);
    				xmlDoc.onload = createQuiz;
    			}
    			else if (window.ActiveXObject) {
    				xmlDoc = new ActiveXObject("Microsoft.XMLDOM");	
    					xmlDoc.onreadystatechange = function () {
    						if (xmlDoc.readyState == 4) createQuiz()
    					};
    			}
    			else {
    				alert('Your browser cannot handle this script');
    				return;
    			}
    			xmlDoc.load(document.getElementById('file').value);
    		}

  • #2
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Look what I did for that in my post [URL="http://www.codingforums.com/showthread.php?t=234822"]post


  •  

    LinkBacks (?)


    Posting Permissions

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