CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   How To Create & Run a Snippet (http://www.codingforums.com/showthread.php?t=276019)

code000 10-10-2012 02:43 PM

How To Create & Run a Snippet
 
I would like to create a Snippet for the following code. Please would you list the steps I would require to achieve this? Thank you.

javascript:alert((new String("http://www.youtube.com/get_video?video_id=%s&sk=%s&t=%s")).replace(/%s/, swfArgs.video_id).replace(/%s/, swfArgs.sk).replace(/%s/, swfArgs.t))

Philip M 10-10-2012 04:13 PM

Place your code within script tags

<script type = "text/javascript">

</script>

and delete javascript:

The script will execute on page load. That is it will show an alert. But that is all it will do.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.


All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.