Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-10-2012, 02:43 PM   PM User | #1
code000
New to the CF scene

 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
code000 is an unknown quantity at this point
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))
code000 is offline   Reply With Quote
Old 10-10-2012, 04:13 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,102
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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 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.

Last edited by Philip M; 10-10-2012 at 04:16 PM..
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Advertisement
Log in to turn off these ads.