package e4s.tutorial; import e4s.html.*; import e4s.servlet.E4ModuleImplementation; /** * Using the DIV element and dynamically hide or show contents of * your page. * * {@tutorial Example_DIV_1} * * @see e4s.html.DIV */ public class Example_DIV_1 extends E4ModuleImplementation { public static E4Method start = null; public void start( HTML html ) { DIV divA = html.DIV(); divA.Message(E4Message.INFO,"This is DIV-A"); html.BR(); DIV divB = html.DIV(); divB.Message(E4Message.INFO,"This is DIV-B"); html.P(); E4EventHandlerA showA = new E4EventHandlerA(E4EventHandlerA._EVENT_ONCLICK,divA.jsShow()); html.A(showA).print("Show A"); html.BR(); E4EventHandlerA hideA = new E4EventHandlerA(E4EventHandlerA._EVENT_ONCLICK,divA.jsHide()); html.A(hideA).print("Hide A"); html.BR(); E4EventHandlerA showB = new E4EventHandlerA(E4EventHandlerA._EVENT_ONCLICK,divB.jsShow()); html.A(showB).print("Show B"); html.BR(); E4EventHandlerA hideB = new E4EventHandlerA(E4EventHandlerA._EVENT_ONCLICK,divB.jsHide()); html.A(hideB).print("Hide B"); } }