Wouldn't it be simpler to have your PHP function in a discrete script file
and call:

<a href="javascript:void(0)" onClick="NewWindow('myscript.php');
return false"></a>

ignatius

-----Original Message-----
From: Bob Sears [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 10 May 2001 10:45
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] HTML/PHP/Javascript



Put on your thinking caps.

I need to open a popup window and display its contents. Since PHP doesn't
have that functionality, I am resorting to Javascript. The two will be used
in
the following manner:

<?
function outputOrderToFile(){

The PHP code that access the MySQL data base, formats the report, and
writes it to FILEA.
}

?>

<script language="javascript">
function NewWindow (sourceHtml){

Parameters about the window (location, size, etc.)
}


the HTML ....

<a href="FILEA" onClick="<? outputOrderToFile(); ?>; NewWindow(this.href);
return false"></a>

Is there anything obviously wrong with that bit of logic/code?

If there is a better way, please sketch it out for me.

Thanks,

Bob Sears, Owner
WebWyshez


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to