Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to call servlet from JavaScript?

843841Jun 28 2006 — edited Jun 28 2006
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2006
Added on Jun 28 2006
1 comment
472 views