Code Samples - Hello World

ATTENTION: To run JClientPages samples you need Java installed.

Hello World Sample

Just enter your name in the input text field and then click the button!



WARINIG: this website bandwidth is a little bit narrow, so page loading and initialization can be a bit slow. Please be patient if your FIRST interaction with the demo takes a bit of time to complete.

Source Code

 <input type="text" id="mytextfield"/>
 <input id="mybutton" type="button" disabled="disabled"
    name="Button1" value="Enter your name and click me!" onClick="greet()" >

 <script type="text/java">

    public void greet(){
        String yourName = getElementById("mytextfield").getAttribute("value");
        alert("Hello "+yourName+"!!!");
    }

    public void onLoad(){
        getElementById("mybutton").setAttribute("disabled", false);
    }

 </script>