• 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

document attribute ?

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I am converting some javascript code over to another html webproject.

Everything almost works except I am getting these type of errors when I view the javascript runtime errors.

113: objmonth = document.edatform.selectMonth;

..etc selectYear

My question is with the DOM object document is document.edatform meaning edatform was the title of some specific page so for instance if I call my html page testpage
would I substitute document.testpage for document.edatform in the js file?

When I look at the document attributes I see no edatform built in type...

Thanks for any clarity on what edatform is. Is it the page title , form id ,....what could it possible be?

Thanks
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's probably the name of a form on the page.

That's a quaint and antiquated way of addressing items. I advise against it.

Assign an id to elements that need to be addressed, and use docment.getElementById() (or better yet, jQuery).
 
Sam Doder
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It wasn't my code to begin with.

However you are right I found that the name of one of the form tags in the html was named edatform so document.edatform must be refering to the form.

I figured it out what a pain.
wish their was a way to debug javascript in eclipse?

would be nice to step thru the javascript code if possible when their is like 10million lines of js code/files ....

anyway figured it out thanks
great help
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guessing you do not know about the features of Chrome, IE8, Firebug [for firefox] which let you set break points and walk through the code. Spend some time and play with it, you will be amazed what you are missing by not using them.

Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic