3.2.0

how to assign a function to button in jsp

i have written a function in java and i need how to call that function in jsp page and that function should invoke when i click button in jsp


plz help its urgent
rajesh
January 18,
I am using button click in my code this way:

var  okBtn = new AW.UI.Button;
           okBtn.setId("myButton");
       okBtn.setControlText("SHow Table");
           okBtn.setControlImage("favorites");
       okBtn.setEvent("onclick",
        function()
                         {
            showMainTable();
        }
    );
    document.write(okBtn);



the showMainTable function is called and an error occurs
'AW' is undifined
but aw.js, and aw.css are included in a file.
chirak
January 18,
You said that you wrote a function in Java. (not Javascript?) In the example you call a function "showMainTable()" which is a Javascript function. I am kind of confused. What's the code in showMainTable() then?

If you wrote a method (Let me use Java's term instead of using Javascript's) in JSP, it won't make any sense if it refers to any javascript variable or function since JSP is compiled and run at server side. A client (browser) only receive the result after an execution.

Anonymous
January 18,

This topic is archived.

See also:


Back to support forum