How to call servlet from JavaScript?
843841Jun 28 2006 — edited Jun 28 2006Hi all,
I have a static html page with a button, which has to trigger a Server-side function that performs DB operations. Only triggering is required from button, no parameters are passed, nothing is returned from the server.
I decided to write a servlet and call it using the JavaScript when button is pressed. My JavaScript that calls servlet is:
win=window.open("http://localhost:81/ErrorNotificator/NotifyError", '_blank', 'height=10,width=10', false);
Everything works fine, except for the blank page that opens after calling this. Can you help me in calling my servlet from javascript so that no window is fired? (I know it is a javascript question, but I couldn't find anything in Javascript forums).
Thanks in advance,
Djam.