What JMrkr said. BUT...
What is WRONG with this:
Code:
<a href="home.php"
onclick="document.body.removeChild(document.getElementById('throne'));return false;"
>Hello</a>
That's perfectly legal and correct JavaScript. Though I can't for the life of me see how you got it from the code you claimed you used. For starters, what put the "..." around
home.php??
Whereas this, that you say you want, is totally bogus:
Code:
<a href="home.php"
onclick="document.body.removeChild(document.getElementById(" throne'));return="" false';=""
>HEllo</a>
It doesn't even make sense. You can't use
return= anything.
Are you trying to put in the *VALUE* of the
variable throne ??? Or, more likely, are you trying to use the ID of the DOM object referenced by your
throne variable??
In that case:
Code:
throne.innerHTML =
'<a href="home.php" onclick="document.body.removeChild(document.getElementById(\''
+ throne.id +'\'));return false';">HEllo</a>';