element id null issue
Here is the link I'm working on: http://blog.blindmikey.com
#Check to see if cookie has been set
#If it has, set $isExtended var to Cookie var
$isExtended = $_COOKIE['isExtended'];
#and echo current value
echo "isExtended = $isExtended ;";
#and set element's rendered class
[COLOR="Red"]if($isExtended == 0)
#If it hasn't, echo default value
echo "isExtended = 1 ;";
And here is a direct link to the full script: http://blog.blindmikey.com/wp-conten...oterToggle.php
Thank you to anyone that can explain this to me, sad to admit, I've spent hours on this.
setProperty() method is not to be applied upon the elements. It has to handle the CSS styleSheets, something like:
To change a class use DOM 0:
var oStyle = document.styleSheets.cssRules.style;
I don't think setProperty will work, in all browsers, in this case.
IE requires className be set:
Same problem will occur with getProperty.
I didn't check if you were using this method with attribute style, but that will not work either.
At least 98% of internet users' DNA is identical to that of chimpanzees
Thanks for the replies guys, I really appreciate it.
However, I've tried using that line of code aswell.
and the line of code posted above.
Each time I get a return message that 'footer' is null... which I don't understand since there is a div with the id of 'footer'...
I'm quite lost...
Last edited by Kor; 05-13-2009 at 04:53 PM.
Thank you for your reply!
Yes, that particular way of fetching an element by id is from the Mootools framework, however, it's not the framework that I'm having an issue with, as no matter what syntax I use, even the most basic document.getElementById('footer').className='min';" returns that the footer is null.
The only question I have is why would it return the message of "document.getElementById("footer") is null" ?
I would greatly appreciate anyone that could help me understand this.
we need to see the whole picture. Do you have a test page?
element null issue
May very well be a sequence problem.
Two things to remember:
"The only place success comes before work is in the dictionary."
"It's more than just a matter of survival. It's a matter of sympathy, compassion, passion and style."
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread