trouble running java through PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dajb
Forum Newbie
Posts: 1
Joined: Thu Apr 21, 2011 7:02 am

trouble running java through PHP

Post by dajb »

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>
eivind
Forum Commoner
Posts: 28
Joined: Tue Apr 19, 2011 7:57 am

Re: trouble running java through PHP

Post by eivind »

Try

Code: Select all

echo '<a href="javascript:showdetail("production_detail.php","200px","850px")">Full Details</a>';
eivind
Forum Commoner
Posts: 28
Joined: Tue Apr 19, 2011 7:57 am

Re: trouble running java through PHP

Post by eivind »

the [text]&#058;[/text] is supposed to be : though ...
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: trouble running java through PHP

Post by califdon »

What are you trying to do? PHP is a different language than Java. You can't simply mix languages.
Post Reply