lukezweb
09-23-2003, 12:14 PM
Ok whats wrong with this in a .js file it dont work?
document.write('footerhere');
document.write('footerhere');
|
Click to See Complete Forum and Search --> : A bit stuck lukezweb 09-23-2003, 12:14 PM Ok whats wrong with this in a .js file it dont work? document.write('footerhere'); Charles 09-23-2003, 12:19 PM Off hand and without seeing the rest of the page I'd say... 1) Know that you cannot "document.write" once a page has already loaded; 2) And using JavaScript for an include is very bad as 13% of users do not use it. lukezweb 09-23-2003, 12:27 PM ok one sec im linking to a .js file using this: <SCRIPT SRC="http://######/footer.js"> in the .js file it has the baove i posted Charles 09-23-2003, 12:29 PM That's incorrect on two accounts. See http://www.w3.org/TR/html4/interact/scripts.html. requestcode 09-23-2003, 12:37 PM Lukesweb, What are you trying to accomplish? If you could give us some details it might help. Also, you can use document.write once a page loads if you are writing to a container such as a div or span tag, but with the new browers it would be better to using innerHTML or innerTEXT. In NS4 version browsers that was how you added or modified HTML or text. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |