DebugBar – Debugging Internet Explorer (IE)
DebugBar provides a nice, simple Javascript console for IE. Does a little better on telling you where problems are too.
DebugBar provides a nice, simple Javascript console for IE. Does a little better on telling you where problems are too.
To enable/disable Javascript caching in Firefox in about:config:
network.http.use-cache = true/false
Advanced JavaScript Debugging Techniques provides a set of useful suggestions on Javascript debugging techniques.
An interesting note in one comment about a Javascript debugging environment for Windows – “If you are on MS Windows and need to debug javascript in Internet Explorer you should give a try to VWD (Visual Web Developer Express Edition).”
The JavaScript Source: Debugging Guide provides a list of common errors.
Firebug JavaScript Debugger and Profiler does a nice job of explaining basic debugging techniques for Javascript in Firebug. Remember to switch to the ‘Script’ tab.
Rhino dojo javascript compression
http://svn.dojotoolkit.org/src/util/trunk/shrinksafe/shrinksafe.jar
http://svn.dojotoolkit.org/src/util/trunk/shrinksafe/js.jar
java -jar shrinksafe.jar infile.js > outfile.js
function findSelectedOptionsAsString(current_select) {
var selected_options = findSelectedOptions(current_select);
var selected_options_string = new String();
for (var selected_option = 0 ; selected_option < selected_options.length; selected_option++) {
if (selected_option == 0) {
selected_options_string = selected_options_string + selected_options[selected_option];
}
else {
selected_options_string = selected_options_string + " " + selected_options[selected_option];
}
}
// debugMessage("Selected options: " + selected_options_string);
return selected_options_string;
}
function findSelectedOptions(current_select) {
var select_options = current_select.childNodes;
var num_select_options = select_options.length;
var selected_options = new Array();
for (var current_option_pos = 0; current_option_pos < num_select_options; current_option_pos++ ) {
var current_option = select_options[current_option_pos];
if (current_option.nodeName == "OPTION") {
if (current_option.selected == 1) {
var current_option_value = current_option.getAttribute("value");
if (current_option_value != null) {
selected_options = selected_options.concat(current_option_value);
}
}
}
}
/*
if (selected_options.length != 0) {
for (var selected_option = 0 ; selected_option < selected_options.length; selected_option++) {
debugMessage(selected_options[selected_option] + " selected");
}
}
*/
return selected_options;
}