...

View Full Version : setting a boolean data member of a form bean from javascript?



aayalona
07-07-2005, 04:33 PM
How do I set a boolean data member of a form bean from javascript?

eg.
XForm.java
boolean show = false;
setShow(boolean s)

boolean getShow()


How do i call setShow from javascript
i tried
document.XForm.setShow(true);

it did not work..
help will be really appreciated.

thank you

glenngv
07-08-2005, 06:29 AM
Java is server-side and Javascript is client-side. So you can't directly call a Java method from Javascript unless it is an applet. If it is indeed an applet, you'd do it like this:


document.applets['appletName'].setShow(true);

If it's not an applet, you can only execute a server-side code by submitting the form.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum