• 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

Redirecting jsp page on clicking a button in js pop up

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On clicking an image in jsp page, I am opening a pop up as follows,

<img src="${imgBanner}" style="cursor:hand; cursor:pointer" onClick="openPopup('Demo', document.all ? 524 : 524,'PopName', event);">

In the pop up window, there is a submit button. On clicking it, the pop up must close and page must be redirected to a different site.

Suppose the pop up window was closed instead of clicking the submit button, nothing must be done.

The pop up contents is just plain html page.


I have tried with adding a close_window() function on clicking the button in pop up, but getting the following js error on clicking the button,

Message: 'window.opener' is null or not an object

Please let me know how to correct it?

FYI, the demo.html page is displayed from weblogic repository and contentviewer.jsp takes care of that (nevermind of this part)


--jsp page



--demo.html



--js file

 
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the pop up is in another domain, you can not do anything because of the same origin policy.


Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic