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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    posting client side java to server side php

    Hi there,

    ive been searching fro the answer to this problem for about 4 days now and now its becomming rather frustrating. Im wondering if some one can help me...

    i have a signature java applet which after it has been used spits out a variable which is a load of x and y co-ordinates. what i want to do with out auccess is either post these directly to a php form or set it up to go to a form so that it can be submitted.


    heres the code

    <html>
    <body>
    <form>
    <h1>Signature Capture</h1>
    <hr>

    <applet name='mysig' code='SigBlock.class' width=301 height=76>
    <param name=text value="Signature">
    <param name=font value="Arial">
    <param name=fontsize value=42>
    <param name=fontstyle value="italic">
    <param name=fontx value=10>
    <param name=fonty value=50>
    <param name=appwidth value=200>
    <param name=appheight value=75>
    <param name=linestyle value=2>
    </applet>

    <input type='button' name='sign' value='Sign' onClick='text1.value=mysig.sign();'>

    <textarea name='text1' cols='65' rows='20' wrap></textarea>

    </form>
    </body>
    </html>

    basically when sign is pressed it dumps the applet varibales to a text area for viewing which is fine, but fro that code does any one know a work around where it can either be submitted directly to a php script or dump as a hidden input field ready for submission with a form.

    and ideas would be great

    Alan

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    865
    Thanks
    7
    Thanked 29 Times in 28 Posts
    I am not sure about submitting data from an Applet to form without making a call to the server. If someone knows of a way do it without making a call to the server...I would be interested to know how as well .

    Anyway...since you want to pass the data from an applet to a php variable I would suggest that you instantiate an instance of the URL class and establish a connection to the server that way.

    In any case...there are loads of examples on Sun Microsystem website on how to use the URL class...

    If you need help with that...just drop us a line and will try and help.

    Cheers,
    ess


  •  

    Posting Permissions

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