Camen Design Forum

Passing Variables via URL

Martijn

It all depends on what you’re using.

Will you be using Javascript to get the value from the URL? Then you need to code your own function for to grab values from the URL or find one on the web. Unless you’re using a Javascript library that already includes a function for this, like SWFObject’s getQueryParamValue().

If you are working with a server side programming language those will often offer standard implementations. PHP for example includes the $_GET variable including all the variables in the query string. That way you could do something like:

~~~ HTML + PHP ~~~>
<video src="<?php echo $_GET['movie_file']; ?>" poster="<?php echo $_GET['poster_image']; ?>"></video>
<~~~

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn