I have developed an editor in java(applet).I have uploaded my applet on my php site.Now i want data that would be coming from database to show in my editor.Data that comes from the database is stored in a text variable in a php file(Code is written to fetch data from database in a PHP file).I have written a function setText() in my java applet which sets data that comes from database on the jtextpane.I am using php-java bridge to call java methods from php.Now my problem is that I have written two php scripts.In the first script the applet is loaded and in the second script I am calling java method.Now after i run my first script applet is displayed.When i run the second php script a value(Static value) that i am passing to the setText() of my java applet sets the jtextpane.When i add both the scripts value does not get set on the jtextpane.My problem is that i dont want to run two scripts simultaneously.I want my applet to be displayed and data coming from php to set on jtextpane in one php script.Can anyone help me with this issue?