Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    setting a boolean data member of a form bean from javascript?

    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

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,030
    Thanks
    0
    Thanked 247 Times in 244 Posts
    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:

    Code:
    document.applets['appletName'].setShow(true);
    If it's not an applet, you can only execute a server-side code by submitting the form.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •