Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Thanked 0 Times in 0 Posts

    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))

  2. #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,699 Times in 2,675 Posts
    Place your code within script tags

    <script type = "text/javascript">


    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.
    Last edited by Philip M; 10-10-2012 at 05:16 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts