trouble running java through PHP
Posted: Thu Apr 21, 2011 7:17 am
I have the following (simplified) php page. When I run with no arguments to call the java function it's OK but it's not when I introduce arguments.
Any help would be appreciated. Thanks in advance
Dave
<html>
<SCRIPT>
<!--
// Script to open Popup Window
function showdetail(urlVD, hVD, wVD){
var cSize="dialogHeight: " + hVD + "; dialogWidth: " + wVD +"; edge: Raised; center: Yes; help: No; resizable: No; status: No";
var cValue=window.showModalDialog(urlVD,0,cSize);
}
-->
</SCRIPT>
<body>
<?php
// WORKS FINE LIKE THIS
echo '<a href="javascript:showdetail()">Full Details</a>';
// BUT NOT LIKE THIS
echo '<a href="javascript:showdetail(production_detail.php,200px,850px)">Full Details</a>';
// OR LIKE THIS
echo '<a href="javascript:showdetail('production_detail.php','200px','850px')">Full Details</a>';
?>
</body>
</html>
Any help would be appreciated. Thanks in advance
Dave
<html>
<SCRIPT>
<!--
// Script to open Popup Window
function showdetail(urlVD, hVD, wVD){
var cSize="dialogHeight: " + hVD + "; dialogWidth: " + wVD +"; edge: Raised; center: Yes; help: No; resizable: No; status: No";
var cValue=window.showModalDialog(urlVD,0,cSize);
}
-->
</SCRIPT>
<body>
<?php
// WORKS FINE LIKE THIS
echo '<a href="javascript:showdetail()">Full Details</a>';
// BUT NOT LIKE THIS
echo '<a href="javascript:showdetail(production_detail.php,200px,850px)">Full Details</a>';
// OR LIKE THIS
echo '<a href="javascript:showdetail('production_detail.php','200px','850px')">Full Details</a>';
?>
</body>
</html>