Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
HTML Pages with CSS and JavaScript
Update the embedded video using javascript/ajax
Kalyan Anand
Ranch Hand
Posts: 194
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have an embedded video in a web page
<embed name="video3" src="http:xxxxxxx" FlashVars="autoplay=false&assetId=video:asset :-P mms:121212&playerId=player1212" quality="high" width="500" height="200" name="player653" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed>
When I click a button the following
java
script code gets executed
document.getElementById("video3").setAttribute("src","http://secondvideoxxxxxxxx");
Whereas it is not loading the new video on the page. Can this be done ?
[ May 18, 2008: Message edited by: Santhosh Jali ]
[ May 18, 2008: Message edited by: Santhosh Jali ]
Eric Pascarello
author
Posts: 15385
6
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
try using getElementById with an id and set the src with the new value without the setAttribute.
Eric
[edit - fixed spelling mistake]
[ May 18, 2008: Message edited by: Eric Pascarello ]
Pauline McNamara
Sheriff
Posts: 4012
6
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<embed name="video3" ...
It looks like "video3" is the value for the name attribute of this element. Maybe getElementById is looking for an id attribute?
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
servlet programming problem in Eclipse
Swing back to AWT
Play video file using servlet
@Deprecated
Real Player Embed In Html
More...