Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 26th, 2004, 04:40 PM
Registered User
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to bearfacts
Default calling java servlet from javascript

I need to call a java servlet from javascript without opening a new window or changing the present one
Old August 26th, 2004, 04:57 PM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

Do you need to receive information, or just pass it? If the latter just use Image:
var sUrl = "servlets/myServlet?param=value";
var dummy = new Image(sUrl);
If you need to receive information you could call it in an iframe or use something like the msxml2.xmlhttp class to make a web request. Examples in these forums, search some of my old posts for "msxml2.xmlhttp".


Joe (Co-author Beginning XML, 3rd edition)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Java Method via javascript basildudin J2EE 5 October 16th, 2008 12:00 AM
Calling java Servlet from ascx page pradeepnair74 BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4 0 October 7th, 2008 07:31 AM
calling a java servlet from a asp.net page dub_beat ASP.NET 2.0 Basics 0 April 2nd, 2007 08:31 PM
calling a servlet by clicking a menu? pandian Servlets 1 February 4th, 2006 10:28 AM
Calling a command from a servlet emirant1 Servlets 1 December 23rd, 2005 11:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.