Jump to content

IE and Opera


vytas

Recommended Posts

Ok this code works in IE but not in Opera .

<script type="text/javascript">function lol()var r= document.getElementById('innhold').valuedocument.getElementById('innhold').innerHTML=r+"[ code]Code[ /code]";}</script><a href="java script:lol()">Click here</a><br />Content<br /><textarea cols='70' rows='10' id='innhold' name='innhold'></textarea>

Could some1 help me figure this outEDIT: If some1 doesn't know what this code does, it adds [ code]Code[ /code] to a textarea

Link to comment
Share on other sites

you are supposed to use .value because a textarea is essentially the same as <input> you just place a closing tag. IE executes wrong code and tries to guess what you meant while other browsers just don't execute the wrong (which what should happen).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...