Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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...
 
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"...
 
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.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic