• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to make child window stay on parent window.

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have two jsp pages page1.jsp and page2.jsp.I am opening page2.jsp from page1.jsp using a javascript function.The
page2.jsp is opening in a new window popup but it is displaying by hiding back on the parent page page1.jsp.
I want to display page2.jsp window popup such that it stays on top of page1.jsp window. I used self.focus() in onload function of page2.jsp,but unable to display.
Can anyone suggest me on how I can achieve this behaviour?

Below is the code of my jsps :

page1.jsp

<script>
function loadpage2() {

var openpage2window = window.open("page2.jsp");
openpage2window .focus();
</script>


<form >

<body onload=" loadpage2();">
Page1 JSP displayed

</body>
</form>



Page2.jsp


<form >
<body onload = "self.focus();">Page2 JSP displayed</body>
</form>
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is entirely about HTML and Javascript, so I'm going to move it to that forum.

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing to do with JSP. Moved to the HTML forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic