Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

innerHtml tips for a newbie

Status
Not open for further replies.

TWillard

Programmer
Apr 26, 2001
263
US
I am working on an innerHtml script, but I am having problems in fine tuning and debugging. Can anyone share some debugging tips for innerHtml and DHTML.

I generally have a fairly good eye for detail. Therefore when debugging my standard HTML, I will often perform a view > source to see the HTML that is being served up by the HTTP server. When I do a view source immediately after some innerHTML has been written by a script, then I can not see the code that I feel should have been written. Am I dead wrong or am I missing something here?

The following javascript alert will throw a not defined error.

<script>
alert('html is: ' + document.getElementById(id).innerHTML);
</script>


 

it's quite possible the version of browser doesn't support what you are attempting to do...or the DOM reference you create isn't correct for the certain browser...

below is a thread that deals with some DOM issues...

thread216-231506

hope that helps...


- spewn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top