Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing PHP variables to a java applet

    Hi,
    I'm trying to send a PHP variable to a java applet, is this possible? I can't find any information on how to do it. (the variable is a file location that the applet will then use)

    Cheers
    Steve

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    You would probably be better off using AJAX.

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,980
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    This depends really on how the php variable and the applet co-exist. Now, applets tend to rely on server side languages to communicate with the databases (if they are off server), and data can be passed in several methods, using xml is one option. However, if its one way, don't complicate the usage, and just throw it in as a parameter, the value of the php variable can be used in the param definitions.

    Hope that helps you

    [edit]
    Quick throw in too
    PHP Code:
    <applet (or object) code="codeForApplet.class" ...>
      <param name="variableToPass" value="<?php echo $variableToPass?>" />
    You do not support applets
    </applet>
    Last edited by Fou-Lu; 03-24-2007 at 06:32 AM.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •