Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nothing executes after confirm box

    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?

    Code:
    <!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>&nbsp;</p>
    </body>
    
    </html>

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    you would just be better off setting up a pause function and have the video paused on page load if they want it to play they clcik the play button. im pretty sure you can do that through the object paramaters but I don't know much about flash objects.
    it's probably got somethign to do with using innerhtml as opposed to createElement or something similar.
    this look sliek what you need - http://www.donatofurlani.it/category...ternetExplorer

  • #3
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    You'll find a missing " in your parameters.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •