CarlosTheDwarf Posted August 25, 2008 Share Posted August 25, 2008 When i call a function, it takes away my background color. I tried using the style tag right in the function, but my program stopped running altogether Link to comment Share on other sites More sharing options...
jeffman Posted August 25, 2008 Share Posted August 25, 2008 Post some code. Link to comment Share on other sites More sharing options...
CarlosTheDwarf Posted August 25, 2008 Author Share Posted August 25, 2008 Post some code.YOU POST SOME CODE!ok no seriously you always help me out so thank you, but i never have the files accessable when i have internet connection(school computer..no flash drives allowed...its like an assignment/test situation) Link to comment Share on other sites More sharing options...
jesh Posted August 25, 2008 Share Posted August 25, 2008 When i call a function, it takes away my background color.Sounds like a document.write() problem to me... Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 25, 2008 Share Posted August 25, 2008 If we don't know exactly what you're doing, it's hard to know what you're doing wrong. Can you try to whip up a similar script from memory?But I think you need to either modify the innerHTML of the head element (not sure that would even work) or translate your CSS to JS. (Or, for any CSS that doesn't need to be dynamic to the user, you could put it straight into the HTML.)And Jesh makes a good point... Make sure you're not overwriting your page with document.write. Link to comment Share on other sites More sharing options...
CarlosTheDwarf Posted August 25, 2008 Author Share Posted August 25, 2008 yeah i needed to document.write() it...thanks guys Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 25, 2008 Share Posted August 25, 2008 Umm... I think you misunderstood. document.write is a bad idea. The first call to it will completely erase your existing page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.