• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to close a child window through the servlet?

 
jespher vhaugn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Does anybody have done closing a window through the servlet? I'm only using Java and servlets in manipulating a form(created separately and viewed through the browser). No javascript.

Here's the scenario: by clicking a link from the parent window, another window opens displaying a form. By clicking a button from the form, the newly opened window should be closed and the focus returns to the parent window.
Is there a way to do this?
Hoping for your inputs.
Thanks,
bitoy
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And you don't use Javascript because...???
bear
 
jespher vhaugn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we're not allowed to use javascript because there is already a predefined form to be manipulated...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we're not allowed to use javascript because there is already a predefined form to be manipulated...

That makes no sense to me, but the point is, there are just some things that require Javascript to accomplish. If you won't or can't or don't use Javascript, then you just can't do those things.
Servlets and JSPs are server-side technologies. HTML and Javascript are client-side. To perform client-side operations, you need to use client-side tools.
Maybe we can discuss why you, or your boss, or your client, or whoever, thinks that you can't safely use Javascript because of some 'predefined form' issue?
hth,
bear
 
Marilyn de Queiroz
Sheriff
Posts: 9061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this?

servlet #1 calls servlet #2 which contains the html of the form. When you click the button (submit (with info) or cancel (with no info) the form) you are clicking a link back to the first servlet
 
jespher vhaugn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I can use javascript in closing the child window,
how will I do it if the command would come from the form displayed in the child window...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic