• 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

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"...
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic