• Post Reply Bookmark Topic Watch Topic
  • New Topic

which JSP opened the popup  RSS feed

 
Rajkumar Katudia
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have 2 jsp pages.

Both of them have almost same code in them.

Both of them have a text field. onclick function of this textbox open a new window (the JS window.open() function. The url is same in both jsp to open a new window).

Now, my problem is, in the new window how do i know which parent page opened it?


I have to execute different SQLs based on which parent opened the pop-up

please help.
thanks in advance.
 
Rajkumar Katudia
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right now, the window.open looks like this:


Can I pass values with the url like so:




and in the target servlet, I can do a request.getParameter???


basically I need to know wich parent JSP page opened this new window.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can pass a request parameter on the URL. Why didn't you just try it to see if it would work?
 
Rajkumar Katudia
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did try it however it did not seem to work.

I did the following:




But somehow I did not get it there.

Please help.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajkumar Katudia wrote:I did try it however it did not seem to work.

Please read: ItDoesntWorkIsUseless

What does happen?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!