• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Opening in a new window

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic