The moose likes HTML, CSS and JavaScript and the fly likes How to open a new modal window from Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to open a new modal window from Servlet" Watch "How to open a new modal window from Servlet" New topic

How to open a new modal window from Servlet

kapildev ganeshan

Joined: Feb 15, 2006
Posts: 17
I need to open a modal window from a servlet. if I give the response.sendRedirect() it is opening in the same window. But i want a modal window to be opened. please help me for this requirement.
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
I believe you can only open a new window on the client side (browser)... so dispatch a html or jsp that uses Javascript and opens a new window.

Also modal window is specific to Internet explorer and not supported in many other browsers. Please refer http://javascript.about.com/library/blmodal.htm
[ February 15, 2006: Message edited by: karthi keyan ]


Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You would do this either with Javascript, or by setting a target attribute in the form from which you are submitting.

Either way, it's more of an HTML issue than a servlet one so moving:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
subject: How to open a new modal window from Servlet
Similar Threads
Error opening pdf file from modal window
Modal Window in Struts
Modal window and its side-effects
Problem with a modal dialog
Javascript help : Please