ballhogjoni Posted August 8, 2008 Share Posted August 8, 2008 Hi everyone, I am new to javascript and wanted some help figuring out how I would change the video on one part of the page when clicking on a link all without the screen reloading. something like cnn.com/video/ Any ideas? I don't have any code written and I have searched google for some info but couldn't find any. I have an idea of what I want it to do: I want to have a div or a table that contains the <object></object> tag and within that there is a url that tells the <object> which video to play. basically all the url's will be the same except for an idenifier. So lets say I have this url: http://blahblah.com/videos?id=1 How would I change that number 1 to 2,3,4, etc using javascript and without refreshing the screen. I am thinking my html code would look like: http://blahblah.com/videos?id=<span id="videoID"> so when someone clicks a link that looks like: <a href="javascript:functionName(1);">click</a> It would dynamically insert the number 1 in the place of <span id="videoID"> Thanks, Chris Link to comment https://forums.phpfreaks.com/topic/118812-change-video-onclick-without-refreshing-screen/ Share on other sites More sharing options...
adam84 Posted August 8, 2008 Share Posted August 8, 2008 Just use <EMBED> tags and use javascript to change the .src when another link is clicked Link to comment https://forums.phpfreaks.com/topic/118812-change-video-onclick-without-refreshing-screen/#findComment-611786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.