www.webdeveloper.com
Results 1 to 2 of 2

Thread: window.document.detect.screenW empty

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    Lightbulb window.document.detect.screenW empty

    Dear fellow programmers. I have a small question. I have a program that runs youtube movies, worked perfect and the video's are played. But it does not show the video in the length and heigth from the frame. That is the issue window.document.detect.screenW is empty....

    Does anybody have a solution?

    Code:
    <html>
    <?php
    if(isset($_POST['check'])){
    	$check = $_POST['check'];
    } elseif(isset($_GET['check'])){
    	$check = $_GET['check'];
    } else { $check = "";}
    if(isset($_POST['screenW'])){
    	$screenW = $_POST['screenW'];
    } elseif(isset($_GET['screenW'])){
    	$screenW = $_GET['screenW'];
    } else { $screenW = "";}
    if(isset($_POST['screenH'])){
    	$screenH = $_POST['screenH'];
    } elseif(isset($_GET['screenH'])){
    	$screenH = $_GET['screenH'];
    } else { $screenH = "";}
    if(isset($_POST['teller'])){
    	$teller = $_POST['teller'];
    } elseif(isset($_GET['teller'])){
    	$teller = $_GET['teller'];
    } else { $teller = "";}
    if(isset($_POST['seconde'])){
    	$seconde = $_POST['seconde'];
    } elseif(isset($_GET['seconde'])){
    	$seconde = $_GET['seconde'];
    } else { $seconde = "";}
    if(isset($_POST['eindtijd'])){
    	$eindtijd = $_POST['eindtijd'];
    } elseif(isset($_GET['eindtijd'])){
    	$eindtijd = $_GET['eindtijd'];
    } else { $eindtijd = "";}
    include '../databaseconnectie/DBconnection2.php'; // connectie toevoegen via include
    
    ?>
    
    <head>
    <title> Youtube Uitvoerscherm </title>
    <style type="text/css">
    html {	
    	overflow-x: hidden;
    	overflow-y: auto;
    	background-color : orange;
    }
    iframe{
    	margin-left: -8px;
    	margin-right: -8px;
    	margin-top: -8px;
    	align : center;
    }
    </style>
    </head>
    
    <body>
    	<input type='hidden' name='screenW' value='screenW'/>
    	<input type='hidden' name='screenH' value='screenH'/>
    	
    	<SCRIPT language="javascript">
    	var screenW = 640, screenH = 480;
    	 var Check = "check";
    	if (parseInt(navigator.appVersion)>3) {
    	 screenW = screen.width;
    	 screenH = screen.height;
    	}
    	else if (navigator.appName == "Netscape" 
    		&& parseInt(navigator.appVersion)==3
    		&& navigator.javaEnabled()
    	   ) 
    	{
    	 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
    	 var jScreenSize = jToolkit.getScreenSize();
    	 screenW = jScreenSize.width;
    	 screenH = jScreenSize.height;
    	}
    	window.document.detect.screenW.value=screenW;
    	window.document.detect.screenH.value=screenH;
    	window.document.detect.check.value=Check;
    	window.document.forms['detect'].submit();
    	</SCRIPT>
    <?php
    if($teller ==""){
    	$tijd = time();
    	$result = mysql_query("SELECT * FROM opdrachten WHERE starttijd < '$tijd' AND eindtijd > '$tijd' AND type = 'youtube'") or exit(mysql_error()); 
    	while ($row = mysql_fetch_array($result)){
    		$youtube = $row['bestand'];	
    		echo "$youtube";
    	}
    
    	$hoog=$screenH -20;
    ?>
    	<?php
    	$teller=0;
    }
    
    else{
    	print "<meta http-equiv=\"refresh\" content=\"0;URL=../index.php\" />"; 
    }
    ?>
    
    </body>
    </html>

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,633
    Code:
    <form name="detect" action="">
    <input type='hidden' name='screenW' value='screenW' />
    <input type='hidden' name='screenH' value='screenH' />
    </form>
    hope this may help
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles