UQI135HM Dynamic HTML and Java
Dynamic HTML – 2 aspects Interaction with user (could be forms or Javascript) Setting object properties dynamically (eg stylesheets)
Dynamic HTML (1) The essential aspect of Dynamic HTML is that the user is involved in providing input - usually via a form. The input is associated with variables - which should have a meaningful name (for example, v_shoes, v_coat). The variables are processed, usually by a set of JavaScript functions. Output is then made to the user - either by setting the values of fields in the table, or (as in the case of the example provided), by setting up a new window.
Dynamic HTML example
Dynamic HTML (2) – stylesheets etc. Example 1 – simple use of Javascriptsimple use of Javascript Example 2 – changing the contentchanging the content Example 3 – adding contentadding content Example 4 – inlineinline Example 5 – Using a stylesheetUsing a stylesheet Example 6 – animating a graphicanimating a graphic Example 7 – more complex Javascriptmore complex Javascript
Java Java code is compiled to a.class file in an intermediate code (bytecode)code This is downloaded and run on the browser by using the Java Runtime Environment (JRE) as a helper. Here’s an exampleexample A useful site: