Reputation: 1279
When I load a script from an external server in the following manner
<div id="verisign-logo">
<script type="text/javascript" src=verisign-url>
</div>
The script gets executed and a flash file is displayed in the div with Id verisign-logo. Verisign-url is a predefined variable.
Now I am trying to load and execute the script asynchronously.I added async attribute to the script tag in the following manner
<div id="verisign-logo">
<script type="text/javascript" src=verisign-url async=true>
</div>
But the weird thing is script gets appened in the div however the flash file doesnot get displayed.What exactly is not right here?
Upvotes: 0
Views: 488
Reputation: 529
With reference from w3schools syntax for async loading is as follows
<script src="demo_async.js" async></script>
Upvotes: 1