I get the object expected error in 2 different pages, and the only common thing i can see is the use of getElementById() function...
Can anyone see any flaw in the code, couse i can't see it ?
Also the below section is the ONLY js code in the page.
I always suggest using code coloring editors in such cases. I use Dreamweaver CS3 and when i paste your code in it i see that 'body' word is colored like an object (in purple color) so i assume it is reserved word. Try changing it.
Nope, not working...
And i'm using Crimson Editor, but syntax is set to HTML as i'm in an html document
Body doesn't appear colored on CE, but i changed to i.e. mainbody, and no change.
Any other ideas?
Wherever there was "body" i changed it to "mainbody" INCLUDING the id on the div element ....
I've also tried using 2 variables instead of 1, of course to no avail
Go figure... >.>
And the if statement didn't change anything
All the JS buttons on the menu got link to "javascript:showbody(body1)", "javascript:showbody(body2)", "javascript:showbody(body3)"
1) I never said If() was correct...read up. I already knew that but i'm used to case-insensitivity in php
2) If you had known from the beggining why let me go through all of this and not suggest it?
3) Yeah it solved it ....thanks
UrButtFullOfArr0ws wrote:What's the freaking point to post HTML code when it's only a div geeze....
Javascript is completely dependent on the HTML that it alters. Without anything to alter, your JavaScript would be doing nothing. When you write code that alters HTML, the HTML is just as important as the code.
miro_igov wrote:How the hell i can know it without to see your HTML code which you so furious hide from me ?
Well you said that you knew immediately what my issue was ^_^
superdezign wrote:Javascript is completely dependent on the HTML that it alters. Without anything to alter, your JavaScript would be doing nothing. When you write code that alters HTML, the HTML is just as important as the code.
Let's not be so hostile.
I knew that
And i didn't start the hostilities... he started every post with WTF or WTH... how could i respond to that?