[Javascript] InnerHTML...
Hey again guys, well heres the problem. When I use
Quote:
<a href="javascript:;" onClick="document.getElementById('contentCell').innerHTML = '';"
I cannot make 2 things change...for instance, I want onclick="document.getelementbyid('something') as well as (contentcell) and both things to change with only 1 click. It does not work when I just place 2 onClicks within the <a any ideas?
Thanks
Re: [Javascript] InnerHTML...
Code:
<a onClick="document.getElementById('contentCell').innerHTML = 'a'; document.getElementById('something').innerHTML = 'b';
Be sure there is no space between 'in' and 'ner' for 'innerHTML', as well as using single quote's for any quoted stuff between HTML double quotes.
Re: [Javascript] InnerHTML...
What he means about quotes is that you have to use ' inside of ", because otherwise HTML would think the JavaScript ends where you open the quote for the inner HTML change. Also, to add more than one JavaScript function, seperate them with a ;
Re: [Javascript] InnerHTML...
Quote:
Originally Posted by
doqunbop
What he means about quotes is that you have to use ' inside of ", because otherwise HTML would think the JavaScript ends where you open the quote for the inner HTML change. Also, to add more than one JavaScript function, seperate them with a ;
You truly give the most useless advice possible.
Re: [Javascript] InnerHTML...
Quote:
Originally Posted by
Pieman
You truly give the most useless advice possible.
Is trying to explain something in a simpler way a crime? If English is not one's mothertongue, the one might have a hard time understanding what a native-English-speaking person says. And there are many, who wouldn't understand quite simple things unless explained real simple...
Why is it you don't seem to like me?