jrevard
07-02-2011, 05:11 AM
Hi, when my page loads it starts with a confrim box. If "Cancel" is selected then the rest of the page loads fine. If "Ok" is selected nothing after the confirm box loads. Any ideas.
Also, it appears that IE and Firefox have trouble with this type of media and Chrome will only play the audio file for about 15 seconds. Any solutions?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Justin Revard</title>
<style type="text/css">
html, body {height: 100%; margin: 0; padding: 0;}
#background {position:fixed; top:0; left:0; width:100%; height:100%;}
#content {position:relative; z-index:1;}
</style>
</head>
<body>
<p><img id="background" src="Images/siteBackground.jpg" /></p>
<div id="content">
<h1>Justin Revard's Home Page</h1>
<p>
<script type="text/javascript"><!--
var r = confirm("Would you like a background tune?");
if (r == true)
{
document.body.innerHTML += '<object class="plugin_video" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="480" width="640"><param name="autoplay" value="true" /><embed title="QuickTime" hidden="true" src="sounds/siteBG.wav" mce_src="sounds/siteBG.wav autoplay="true" loop="true" controller="true"></embed></object>';
}
else
{
alert("If you change your mind reload the page to choose again.");
}
// --></script>
</p>
<p>
<table>
<tbody>
<tr>
<td><a href="Source/page2.html" style="opacity:0">Page 2</a></td>
<td><a href="Source/page3.html" style="opacity:0">Page 3</a><br /></td>
<td><a href="Source/today.php" style="opacity:0">Today's Date</a></td>
<td><a href="Source/morePHP.php" style="opacity:0">More PHP</a></td>
<td><a href="Source/database.php" style="opacity:0">Database</a></td>
<td><a href="source/products.html" style="opacity:0">Products</a></td>
<td><a href="Source/origFileRead.php" style="opacity:0">Original File Reader</a></td>
<td><a href="Source/fileRead.php" style="opacity:0">File Reader</a></td>
</tr>
<tr>
<td><a href="http://justinrevard.com"><img src="Images/homeButton.jpg" /></a></td>
<td><a href="foosball.html"><img src="Images/foosballButton.jpg" /></a></td>
<td><a href="physics.html"><img src="Images/physicsButton.jpg" /></a></td>
<td><a href="skiing.html"><img src="Images/skiingButton.jpg" /></a></td>
<td><a href="message.html"><img src="Images/messageButton.jpg" /></a></td>
<td><a href="links.html"><img src="Images/linksButton.jpg" /></a></td>
<td><a href="aboutMe.html"><img src="Images/aboutMeButton.jpg" /></a></td>
</tr>
</tbody>
</table>
</p>
</div>
<p> </p>
</body>
</html>
Also, it appears that IE and Firefox have trouble with this type of media and Chrome will only play the audio file for about 15 seconds. Any solutions?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Justin Revard</title>
<style type="text/css">
html, body {height: 100%; margin: 0; padding: 0;}
#background {position:fixed; top:0; left:0; width:100%; height:100%;}
#content {position:relative; z-index:1;}
</style>
</head>
<body>
<p><img id="background" src="Images/siteBackground.jpg" /></p>
<div id="content">
<h1>Justin Revard's Home Page</h1>
<p>
<script type="text/javascript"><!--
var r = confirm("Would you like a background tune?");
if (r == true)
{
document.body.innerHTML += '<object class="plugin_video" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="480" width="640"><param name="autoplay" value="true" /><embed title="QuickTime" hidden="true" src="sounds/siteBG.wav" mce_src="sounds/siteBG.wav autoplay="true" loop="true" controller="true"></embed></object>';
}
else
{
alert("If you change your mind reload the page to choose again.");
}
// --></script>
</p>
<p>
<table>
<tbody>
<tr>
<td><a href="Source/page2.html" style="opacity:0">Page 2</a></td>
<td><a href="Source/page3.html" style="opacity:0">Page 3</a><br /></td>
<td><a href="Source/today.php" style="opacity:0">Today's Date</a></td>
<td><a href="Source/morePHP.php" style="opacity:0">More PHP</a></td>
<td><a href="Source/database.php" style="opacity:0">Database</a></td>
<td><a href="source/products.html" style="opacity:0">Products</a></td>
<td><a href="Source/origFileRead.php" style="opacity:0">Original File Reader</a></td>
<td><a href="Source/fileRead.php" style="opacity:0">File Reader</a></td>
</tr>
<tr>
<td><a href="http://justinrevard.com"><img src="Images/homeButton.jpg" /></a></td>
<td><a href="foosball.html"><img src="Images/foosballButton.jpg" /></a></td>
<td><a href="physics.html"><img src="Images/physicsButton.jpg" /></a></td>
<td><a href="skiing.html"><img src="Images/skiingButton.jpg" /></a></td>
<td><a href="message.html"><img src="Images/messageButton.jpg" /></a></td>
<td><a href="links.html"><img src="Images/linksButton.jpg" /></a></td>
<td><a href="aboutMe.html"><img src="Images/aboutMeButton.jpg" /></a></td>
</tr>
</tbody>
</table>
</p>
</div>
<p> </p>
</body>
</html>