Again, this is a guess, but it looks like two
parameters to the applet are used;
One called Document and another to indicate
that BASE64 encoding was used to encode the html so that the browser
doesn't try to render the html into a page.
when you output your form (FROM PHP, of course),
somehow include the following among the parameters for the applet;
echo "<param NAME=\"DOCUMENT\" VALUE=\"".base64_encode($htmlsource)."\"\n"
."<param NAME=\"BASE64\"
VALUE=\"true\">\n";
odds are against this working(I'm a
pessimist), but it is what I would try before moving on.
Warren
Warren -
That works...
http://209.204.172.137/editor/ekit.php
Now the next challenge is to put the value in $text into the HTML editor with some _javascript_...any suggestions?
Todd
Vail, Warren wrote:
There may be other methods, but one that seems to be available from your form will require some _javascript_ code. Clicking the button located below the applet (onclick event), performs an assignment to the textarea.value (located below the button) the result returned from the applet.gettext() method (actual statement below).
document.EkitDemoForm.TextViewer.value = document.EkitDemoForm.Ekit.getDocumentText();
I would suspect you could to this assignment to a hidden html field and then do a form submit to pass the "hidden" value to your php program on your server. Don't forget to have your form action field invoke your php program and with method=post you could retrieve the value as below;
$htmltext = $_POST["hiddenfld"];
hope this helps,
Warren Vail
-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 11, 2003 3:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Integrating an Applet with PHP
I have located an HTML editor written in Java that works with my clients
various computers (e.g. Linux, PC and Macs). What I need to do is learn
how to take the output from an Applet and put it into a PHP variable.
Since I have no experience with Java, I am at a disadvantage, so if
someone could point me toward some literature that explains this or if
someone already has the experience and can look at the source and tell
me how, it would be greatly appreciated.
http://209.204.172.137/editor/ekit.php
Todd
--
![]()