Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Opening in a new window  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i redirect a servlet to jsp or a html opened in a new popup window?
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by savitha rao:
How do i redirect a servlet to jsp or a html opened in a new popup window?


hi,
I guess window.open("jspurl") w'd work.
Pls check out the javascript window.open() method i think u can also pass pop up window dimensions to the open() method.
karthik.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by savitha rao:
How do i redirect a servlet to jsp or a html opened in a new popup window?


I am trying to do the same thing.
Here is the solution.
<SCRIPT language=javascript>
function newWindow(form) {
myLeft = (screen.width-600)/2;
myTop = (screen.height-500)/2;
var newWin = window.open(form, 'form', 'toolbar=yes,scrollbars=yes,resizable=yes,width=640,height=500,top='+myTop
+',left='+myLeft);
newWin.focus();
}
</script>
<FORM>
<CENTER>
<INPUT TYPE=button VALUE="Submit" onClick="newWindow('http://localhost:7001/testServlet?Page=test');">
</CENTER>
</FORM>

Thanks,
Rama


[This message has been edited by Rama Chennupati (edited July 26, 2001).]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!