Okay, so I'm trying to replace the div contents with javascript. It works perfectly until I try to make the replacement text clickable.
For example, this works:
Code:
<div id="articles_author_copy">
<p>Click on an author to the left to view a list of their articles</p>
</div>
<a href="#" onclick="document.getElementById('articles_author_copy').innerHTML='<p>Title of Article Here</p>';">Author name</a>
This doesn't:
Code:
<div id="articles_author_copy">
<p>Click on an author to the left to view a list of their articles</p>
</div>
<a href="#" onclick="document.getElementById('articles_author_copy').innerHTML='<a href="#">Title of article here</a>';">Author name</a>
I'm assuming it's some kind of syntax error, I just need someone to point me to what it is.
Any help would be great.
Bookmarks