Web Hosting Talk







View Full Version : Need some javascript help


robertson
07-04-2008, 11:36 PM
Hi Guys,

I need some javascript help. I need to display alexa ranking of a site in a overlib popup. I want the follwoing to work....but wasn't successful.

<a href="javascript:void(0);" onmouseover="return overlib('<SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/s/a?url=www.yahoo.com'></SCRIPT>');" onmouseout="return nd();">View Alexa Ranking</a>

Also I am using smarty. Any help would be great appreciated.

Burhan
07-05-2008, 03:36 AM
You need to escape your quotes


"return overlib('<script type=\'text/javascript\' language=\'javascript\' src=\'http://xslt.alexa.com/site_stats/js/s/a?url=www.yahoo.com\'>');"