Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Facing problem on close of a popup which i opened using the action class.

 
hrishikesh deodhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, Here is the situation..

I need to create a popup on click of a link.. and display some data on that poppedup jsp...

Now, here is what i did..
I created a hyperlink on the existing page.. looks something like this...
<a href="" on click="displayPopup();">Display FLevel data</a>
now.. on click of this link, the javascrip function opens a window using

window.showModalDialog("DisplayFLevel.do","","Page");

using this...
i call the action class DisplayFLevel.do and fetch the data i want to show it on the jsp and forward it to a jsp...
i am using tiles..
now once i close the poppedup jsp.. the parent window gets submitted to the context root of the web application.. and i have no idea why it is doing that...
 
Nick Williamson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's because you're ...href=""..., if you're going to us the a tag and not need a url in the href attribute, having ...href="#"... normally takes care of that

just put a # and at worst it'll shoot you to the top of the page. If you need it to stay a the scroll level you're at create an anchor



and then in the href attribute of the link put ...href="#anchorname"...
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you changed your code to the following?



- Brent
[ May 15, 2007: Message edited by: Brent Sterling ]
 
Nick Williamson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had issues in some browsers with javascript inside the href, but it will work on some, but not all, it's safer using the onclick event.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic