Thursday, July 5, 2007

Javascript trouble shooting tools:

Javascript trouble shooting tools:

www.getFireBug.com à It is a powerful debugging tool for javascript. It is convenient just like eclipse debug. More details are in the website.

JSEclipse à Javascript editor plugin for eclipse . Helps in autocompletion, find the error in javascript. To use, extract the attached file, copy contents of plugins folder into ..\eclipse\plugins and features into ..\eclipse\features . Restart eclipse.

Simple usage details :

Right click on the JSP code enclosing the tag.

Note that this plugin marks the error in red. But it doesn’t show the actual cause of error(a limitation).

More details http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/

1 comment:

Anonymous said...

Code to read file using javascript is below:


function loadXMLDoc(){
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttp.onreadystatechange=function(){

if (xmlhttp.readyState==4 && (xmlhttp.status==200 || window.location.href.indexOf("http")==-1)){
document.getElementById("myDiv").value=xmlhttp.responseText;
}
}

xmlhttp.open("GET","file.xml",true);
xmlhttp.send();
}