Results 1 to 3 of 3

Thread: Excepting varibales in Java

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Posts
    80

    Excepting varibales in Java

    This is a java question. I want a user to come to my we page enter some information into a webpage check the information thourgh javascript and then pass the variables to a java class file.

    How does one do this?

    Im not sure im making any sense so if im not let me know!

  2. #2
    Addicted Member Mrs Kensington's Avatar
    Join Date
    Sep 2001
    Location
    Dorset, UK
    Posts
    144
    I'd do it through perl (but thats coz i know hardly any javascript)... then you could just change the path of the applet to include the variables.

    You may have more luck asking in the Javascript forum.
    Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    Do you mean to say that you want to pass the variables to a method in a Java class? If so, then pass them in a parameter list like you would pass them to another JavaScript function.

    Here are the pertinent snippets from a web page that I recently created. They are from a socket applet and the web page's html & JavaScript.

    Code:
    // the java method
      public String sendRequest(String requestRec)
    
       {
        // connect to the host & send request
        if (send2Host(requestRec) == statusFailed)
           {
            return (errMsg);
           }
    
        return (replyRec);
       }
    
    // the calling JavaScript
          repRec = document.w2hsocket.sendRequest(reqRec);
    
    // the html applet tag
        <APPLET NAME="w2hsocket" CODE="wclient.class" HEIGHT="1" WIDTH="1"></APPLET>
    HTH

Posting Permissions

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



Click Here to Expand Forum to Full Width