Hi,
i'm having a java applet running on my site
and this applet allows the user to submit some information to the server via a POST method. (this applet posts to a php page)
then, the php page produces output correctly
now the problem is...how can i make this output page appear in place of the applet page itself?
right now, all i can do is the send the output code back to the applet itself. and i can't do anything with it from inside the applet to make the page replace the applet page.
thank you very very much
redirecting output
Moderator: General Moderators
- coolpravin
- Forum Newbie
- Posts: 20
- Joined: Mon May 19, 2003 12:56 am
- Location: India
Chek submit use same page
Instead of applet do this in php itself.
i.e after the information is send to php page.
Make echo whatever you want
and then exit; at the end
Like this
THis should work for you
i.e after the information is send to php page.
Make echo whatever you want
and then exit; at the end
Like this
Code: Select all
<?php
if($submit)
{
//php code
//echo output
exit;
}
Applet code here
?>-
thammaknot
- Forum Newbie
- Posts: 2
- Joined: Thu May 29, 2003 1:01 am
first of all, thanks for the answer!
i got what you said but would that work?
i'm sending POST data from inside the java applet
so...it's the applet that must retrieve the output of the php page.
i use the method showDocument in java.Applet.AppletContext
and successfully replace the applet page with the new one
however, it seems like the connections are different.
POSTed data never appears on this new page.
it seems like the new page(that replaces the applet) comes thru a different connection from the one i posted data.
or maybe i still don't understand your answer completely
any suggestions?
thanks a lot
i got what you said but would that work?
i'm sending POST data from inside the java applet
so...it's the applet that must retrieve the output of the php page.
i use the method showDocument in java.Applet.AppletContext
and successfully replace the applet page with the new one
however, it seems like the connections are different.
POSTed data never appears on this new page.
it seems like the new page(that replaces the applet) comes thru a different connection from the one i posted data.
or maybe i still don't understand your answer completely
any suggestions?
thanks a lot