Click to See Complete Forum and Search --> : Debugging HTML and javascript


John S
May 21st, 2005, 06:13 AM
Hi All, two questions if I may. The first will be quite simple I am sure.

I have a text string on my html page: "Enter, or paste text here"

it exists like this:

<div id="edit" id="textString" contentEditable="true" style="position:relative; left:50px">
<p>Enter, or paste text here</p>
</div>

I want to access the value of this object, in jscript, something like this:

var actualTextString = document.getElementsByName("textString").text;

// I know this does not work. What will?

--------------

The second question:

I have missed some basic step in my very first html project and am at a complete loss as to what development environment I should use to develop within. I assumed I could simply open the file1.htm page I created within visual studio and run it, be told about the syntax errors, and then debug and trace the jscript watching variables, etc. Even having the environment auto-complete for me just like one would developing c++, VB, etc.

I have Visual studio .net professional 2003. I have come across an old book on visaul interdev v6.0. This seems to be an environment that will suit but as I am unable to find anything recent on it I guess it has been superseded. As a complete novice to html, dhtml and jscript development can I be given some advice as to what environment is the best to work in?

Thanks in advance, John.

Dr. Script
May 21st, 2005, 03:19 PM
1) You can refer to the element the same way, using instead: .firstChild.data
2) ... ?

John S
May 23rd, 2005, 02:30 AM
I would like to know of a decent tool to build, edit and debug dhtml (that contains javascript) on XP. I want to be able to trace trough the code watching variables, etc.

Dr. Script
May 23rd, 2005, 03:53 PM
There have to be some, because I too would love that. I've just never searched for one.