1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP]Is it possible to load JavaApplet and pass applet parameters from a Javascript file?

Discussion in 'Web Design' started by blackmint, Jan 6, 2015.

  1. blackmint

    blackmint Power Member

    Joined:
    Jun 8, 2013
    Messages:
    656
    Likes Received:
    340
    Location:
    BHW
    I have a website on which a Java Applet Loads.
    I don't want the users to see the Applet Path or At least Applet Parameters from View Source Code Option.
    Because there is my Login Info in the parameters.

    Is it possible to load all these data from an external file like JS file for which the visitor don't have Direct Access to.
    I don't want the visitor to know my login details to the Applet.

    Below is my Code.


    Code:
    [B]<html>
    
    <head>
    <title>Auto Poster</title>
    </head>
    
    <body>
    <p><b></b></p>
            
    <applet
      archive  = "poster.jar"
      codebase = "."
      code     = "1.poster.class"a
      name     = "aposter"
      width    = "200"
      height   = "200"
      hspace   = "0"
      vspace   = "0"
      align    = "middle"  
      mayscript = "true"
      scriptable = "true"
      alt="Enable or install java: http://www.java.com/en/download/index.jsp"
    >
    <param name = "loginIP" value = "192.168.1.1:12345"> 
    <param name = "loginName" value = "testlogin">
    <param name = "loginpwd" value = "testpwd">
    <param name = "MAYSCRIPT" value = "true">
    <param name = "mayscript" value = "yes">
    <param name = "scriptable" value = "true">
    <param name = "pluginspage" value = "http://java.com/download/">
    <param name = "permissions" value = "all-permissions">
    
    <b>You must enable java or install from <a href="http://www.java.com/en/download/index.jsp"> here </a>  </b>
    </applet>
    
    </body>
    </html>[/B]
     
  2. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,642
    Likes Received:
    11,355
    Occupation:
    Pusillanimous Knitter
    Location:
    Buenos Aires
    Whatever file the user's browser can reach, the user can read, so no.
     
  3. blackmint

    blackmint Power Member

    Joined:
    Jun 8, 2013
    Messages:
    656
    Likes Received:
    340
    Location:
    BHW
    Ok.

    But is the above thing possible via calling external JavaScript ?
     
  4. ttrox

    ttrox Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    217
    Likes Received:
    76
    There's no difference though, like jazzc said, if your objective is hiding it from the user view, then they will be able to see it regardless. If you want to make it harder... that's another thing.
     
    • Thanks Thanks x 1
  5. blackmint

    blackmint Power Member

    Joined:
    Jun 8, 2013
    Messages:
    656
    Likes Received:
    340
    Location:
    BHW
    I got it.
    But my idea is to copy the above code to JS File and call that in my homepage in a single line.
    At least a single layer protection...

    If possible how to code JS File. Anyone???