The code below just hides the movie that I am playing behind. Remove element (if possible) or disable it, specially movie playing in background. I tried using document.video.disabled=true;
but its not working. Any idea how to go around this problem please?
JavaScript
x
30
30
1
<script type="text/javascript">
2
function showHide() {
3
var div = document.getElementById('wrapper');
4
if (div.style.display == 'none') {
5
div.style.display = '';
6
}
7
else {
8
div.style.display = 'none';
9
}
10
}
11
12
13
<form id="searchForm" name = "searchForm" onSubmit = "return fetchResults();">
14
<input id="q" name="q" type="text" alt="Search" placeholder="Type here">
15
<input type="hidden" name="wt" value="json" />
16
<input id="submit" type="button" value="Search" onClick = "fetchResults();showHide();changeStyle();" />
17
18
<div id="wrapper" style="display:''">
19
<div id="left">
20
random text
21
</div>
22
<div id="right">
23
<video width="500" height="300" controls="controls" autoplay="autoplay" name="video">
24
<source src="movie.mov" type="video/mp4" />
25
<embed src="movie.swf" width="600" height="500" />
26
</object>
27
</video>
28
</div>
29
</div>
30
Advertisement
Answer
Try
JavaScript
1
5
1
function showHide() {
2
var div = document.getElementById('wrapper');
3
div.parentNode.removeChild(div);
4
}
5