Forum Moderators: open

Message Too Old, No Replies

Javascript document.how to target

javascript targeting with document

         

shudson250

6:33 pm on Jul 2, 2007 (gmt 0)

10+ Year Member



In order to keep my files more organized, I took all of my Javascript off my index page and linked it in a file called java.js Just to clean things up a bit. The problem I'm having now is that I've got document.getElementById 's in my javascript, and I'm not sure what to change the 'document' to for targeting my index page.
I have a div tag with the id 'map' on the index page, and the code needs to see where that is... how do i do this?

Fotiman

6:47 pm on Jul 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You don't need to do anything different. If it worked before, it should still work after moving it to its own file.

shudson250

2:03 am on Jul 3, 2007 (gmt 0)

10+ Year Member



Thanks! a silly question after all.