Discussions

Web tier: servlets, JSP, Web frameworks: Server Side call from onChange()

  1. Server Side call from onChange() (1 messages)

    Is it possible to call a server side function from a client side html call such as onChange()? I tried onChange="<%=validate()%>"> but this does not seem to work. I also tried calling it as I normally would to client side javascript, and then calling server side javascript from client side and this does not work either. Thanks for any suggestions and help.
  2. Server Side call from onChange()[ Go to top ]

    (sorry my poor english, i'm a bit tired at the moment)

    one way to do this is to submit a form with onChange()

    ..goes something like :
    <select onChange="Javascript:formname.submit();">
    ...

    and this form looks something like:
    <form name="formname" action="servlet/myservlet">


    this is one way to send a request to servlet.

    you can also send and request to servlet doing something like :
    onChange="Javascript:document.location('servlet/myservlet');"


    but both these ways are something we call by the name "bubblegum" ;)


    Regards,
    Kari