I'm trying to grab a variable from a URL and dynamically embed it into HTML code. So for instance, if I own the site test.com and I enter "http://www.test.com/?video=bunny.mp4&height=720&width=480", I want the returned page to be an embedded video of bunny.mp4 at the height and width specified. I know the embed code, I just need to know how to parse the URL and write it inside of the HTML. Thanks in advance for your replies!
Actually it is exactly what you want unless you want to hop from page to page. Sending the AJAX request can return your video markup to a div (or the <video> tag in HTML5) on a single page. If you want to go from page to page then you can use your server-side scripting language to create your embed. For instance in PHP URL variables are available in the $_GET superglobal
I appreciate your suggestion Jay, but I looked over that page and I have no idea what I'm looking at. I have implemented jQuery scripts such as Colorbox and ScrollTo, but this looks really complicated. Is there an example of this in action? Looking at the code would be the best option for me... Thanks.
So I've tried almost everything I can think of. I've done a ton of Google searches and can't seem to find out how to do this. I'm sure I looked at a dozen of working solutions, but I just don't understand the code. Can someone just take a look at the page above and point me in the right direction?