![]() |
| ||
| debugging? hey im really new with javascript. can someone tell me whats wrong with this? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> thanks so much, Jason |
| ||
| Re: debugging? Where have you declared 'slopetop', 'slopebottom' and 'slopefinal'? And document.write() is evaluated as the page is being rendered. Plus Javascript is a client side technology; as soon as a page is submitted, what you get is a new page and the state maintained in Javascript variables is reset. You need to dynamically update the value of a span or div element to get this code working as expected. Something like: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| ||
| Re: debugging? thanks! |
| ||
| Re: debugging? You were having a hard time debugging this simple snippet because maybe you were testing this code in IE; for debugging use Firefox. It provides good debugging support given it has error console (Tools -> Error Console). To try it out, run your previous snippet which you just posted in Firefox and look at the error console; the errors would be right there. If you are up to it, you can even try the Firebug plugin which provides full blown debugging. And you can be pretty sure that if something works in Firefox will also work in IE. |
| All times are GMT -4. The time now is 3:53 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC