Skip to content Skip to sidebar Skip to footer

What's Wrong With My Javascript Code?

I'm trying to create some javascript code that will display a javascript form (from formstack.com) on my website certain days of the week. However I can't seem to get it working.

Solution 1:

You're trying to display raw HTML inside JavaScript which won't work.

<scripttype="text/javascript">
if(isOpen())
{
    document.write( '<scripttype="text/javascript"src="http://www.formstack.com/forms/js.php?1134414-uqmj2UXxEw-v2"></script>' );
}
</script>

That said, even better would be to use a server-side language instead of JavaScript for things like this.

Post a Comment for "What's Wrong With My Javascript Code?"