debugging?


hey im really new with javascript.
can someone tell me whats wrong with this calculate distance and slope between two points } point 1: ( , ) point 2: ( , ) Calculate! distance: document.write(distance); slope: document.write(slopetop); ----- = document.write(slopefinal); document.write(slopebottom);
Posted On: Saturday 24th of November 2012 04:33:08 AM Total Views:  359
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




breakpoint debugging in javascript -- state of the art

, Wondering what 's experience with breakpoint debugging is here. I've been using firebug for a few years and, while I'm delighted to have _some_ debugging ability, I've found it to be very fussy, difficult to know when it's going to work or not. I'm curious how others approach debugging, and if anyone here feels they are able to use a breakpoint debugger reliably.
VIEWS ON THIS POST

185

Posted on:

Wednesday 17th October 2012
View Replies!

debugging - what am I missing?

what is wrong with this Code: function addfavorites(classid,userid) { // alert("here"); var urltoajax = "addfavorites.phpj=1&classid="+ classid + "&userid="+ userid; urltoajax = urltoajax + '&rnd=' + Math.round(Math.random() * 10000) alert(urltoajax); $.ajax({ url: urltoajax, cache: false, success: function(html) { $("#message").html(html); } }); //alert('here 2'); } i get an error Object doesn't support this property or method
VIEWS ON THIS POST

136

Posted on:

Saturday 20th October 2012
View Replies!

debugging javascript on FireBug

I am trying to debug this with FireBug Code: function chapter12_nodeOne() { //create an element var element = document.createElement('input'); //set some attributes element.setAttribute('type', 'button'); element.setAttribute('value', 'submit'); //appendd the element into a DIV document.getElementById('myDiv').appendChild(element); //uses EventUtil to attach an event listener (1) EventUtil.addHandler(element, 'click', function() { alert('added event handler') }); } var EventUtil = { (2)addHandler: function(element, type, handler) { //check if the element and the browser support DOM Level 2 event attachment //if the user is not browsing with IE if (element.addEventListener) { element.addEventListener(type, handler, false); } //if user is browsing with IE else if (element.attachEvent) { element.attachEvent("on" + type, handler); } //if user is using a browser that only supports DOM Level 0 event attachment else { element["on" + type] = handler; } }, removeHandler: function(element, type, handler) { //check if the element and the browser support DOM Level 2 event attachment //if the user is not browsing with IE if (element.removeEventListener) { element.removeEventListener(type, handler, false); } //if user is browsing with IE else if (element.detachEvent) { element.detachEvent("on" + type, handler); } //if user is using a browser that only supports DOM Level 0 event attachment else { element["on" + type] = null; } }, preventDefault: function(event) { if(event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } } }; I put a breakpoint on the line marked with (1), I am trying to go to line (2) with all the available options FireBug gives, but unfortunately I get the end of chapter12_nodeOne function. Any ideas why
VIEWS ON THIS POST

233

Posted on:

Saturday 20th October 2012
View Replies!

Best Tools For Javascript development and debugging

What do you use and why I've always used Dreamweaver and Firefox to write/debug. Any other suggestions
VIEWS ON THIS POST

231

Posted on:

Friday 16th November 2012
View Replies!