Hi, Friday, September 12, 2003, 9:38:48 AM, you wrote: TC> Warren -
TC> That works... TC> http://209.204.172.137/editor/ekit.php TC> Now the next challenge is to put the value in $text into the HTML editor with some JavaScript...any suggestions? TC> Todd TC> 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 >> >> What I do in a similar situation is to pass the data in a hidden field and then pass that to the java applet. As it is html you will be passing you have to use rawurlencode($data) in the php script <? $data = rawurlencode($data); ?> In the html part <body onload="whatever.applet.Value = unescape(document.form1.data.value);"> <form name="form1" action=........> <input type="hidden" name="data" value="<? echo $data?>"> .. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

