Converting Javascript code to Visual Basic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • praclarush
    New Member
    • Oct 2007
    • 27

    Converting Javascript code to Visual Basic

    I’ve tried a verity of different things but I can’t seem to find something that works so I thought I would Ask here, if This is the wrong place then Sorry If you could point me to the correct place the I would Post there. Now I have this JavaScript code that I want to get working in a VB.Net Client side application, could anyone here help me with translating it to something that might work in VB.Net? Thanks Nathan

    Code:
    function send_request() {
    
    	if (window.XMLHttpRequest) { // Mozilla, Safari, ...
        		http_request = new XMLHttpRequest();
    	} else if (window.ActiveXObject) { // IE
        		http_request = new ActiveXObject("Microsoft.XMLHTTP");
    	}
    
    	http_request.onreadystatechange = function(){
    		if (http_request.readyState == 4) {
    			document.getElementById("url_response").value = http_request.responseText;
    		}
    	};
    	
    	if (document.getElementById("url_type").value = "POST") {
    		http_request.open('POST', document.getElementById("url_dest").value, true);
            	http_request.send(document.getElementById("url_request").value);
    	} else {
    		http_request.open('GET', document.getElementById("url_dest.value").value, true);
            	http_request.send(null);
    	}
    	
    }
  • praclarush
    New Member
    • Oct 2007
    • 27

    #2
    Never Mind I managed to fixed

    Comment

    Working...