Tuesday 15 April 2014

Change parameter onclick using JavaScript -


I am trying to change the parameter of an object when a user clicks on a link on that site which is another video refers to the.

HTML

  & lt; Object id = "myExperience8675309" class = "BrightcoveExperience" & gt; & Lt; Param name = "bgcolor" value = "#fffff" /> & Lt; Param name = "width" value = "480" /> & Lt; Param name = "height" value = "270" /> & Lt; Param name = "player id" value = "123456789" /> & Lt; Param name = "playerKey" value = "abcdefghijklmnop" /> & Lt; Param name = "isvid" value = "true" /> & Lt; Param name = "isUI" value = "true" /> & Lt; Param name = "dynamic streaming" value = "true" /> & Lt; Param name = "@ video player" value = "8675309" /> & Lt; / Object & gt;   

I'm not sure how to use the object's parameters through the onclick function. I want to change the @Video Player value:

Using foo as an arbitrary trigger element:

  var Foo = document.getElementById ('foo'); Foo.onclick = function () {document.getElementsByName ('@ Video Player') [0] .value = '123456'; }   



No comments:

Post a Comment