• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem setting TD tag innerHTML

 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic