wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Problem setting TD tag innerHTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem setting TD tag innerHTML" Watch "Problem setting TD tag innerHTML" New topic
Author

Problem setting TD tag innerHTML

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
I've posted the function I call below and also the html code that is involved. I keep getting an error message regarding unknown runtime error. ANy idea to why I'm getting this error? Any help appreciated.



Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
I should also point out that by removing everything in the script except the getElementById line and adding a line to just set the innerHTML to the TD still gives me the same error. It's like it doesn't like the getElementByID returned value or the innerHTML property.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What browser are you having the error in. That is important in web development.

Did you test to see what getElementById returns?



You should not name your button submit. It overrides JavaScript functionality. It is also good practice not to name your variables the same the form element names.

Side question:
What are you using that has the equals() method? Did you extend String.prototype?
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
Hi Eric,
Everything you are now looking at is the result of mixing things up to see why things weren't working. Far from the original. As with the naming conventions, this is just something I was playing with to see if I could get it to do what I wanted but, again, the names started out being totally different than they are now. I'm using IE by the way.

Rob
 
 
subject: Problem setting TD tag innerHTML
 
Similar Threads
document.forms[0].submit(); throws Invalid Argument in IE
problem in using Ajax calls
spaces while populating using s:iterator
display:column + javascript
In the messages module reply is not working