I'm trying to call an Aweber form code inside of a function in the head of the document. I'm creating a simple link that, when clicked will open up an Aweber form. But it's not working. I'm using the document.write function and have no clue if it's right at all.
Here's the head section code:
<script type="text/javascript">
function aweber()
{
document.write("<script type="text/javascript"
src="http://forms.aweber.com/form/74/1378551674.js"><\/script>");
}
</script>
And here's what I'm including in my document. It's not working -- I think it's a silly syntax issue.
<a href="javascript:aweber()">Aweber Form</a>