• 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

Pop Up Windows

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys!

I have a javascript function that opens a pop- up window. However, I would like to restrict the number of windows being opened. IOW, if I click the link 3 times, the pop up window is opened as 3 different windows. I'd like my function to open the window only once, i.e, if a pop-up window is already opened, the function shouldn't let me open a fresh pop-up.

I hope I did make sense to you?? Or was it all pop-up pop-up??
 
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just give a name to the child window you are opening.

This will make sure that only one pop-up window is opened.

But however, in the above approach, the page is loaded everytime when the function is called (but it is loaded to the same window).

Alternativly you can use



This way you avoid loading the page everytime the function is called.
 
Anand Jayaraman
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mani!

Thanks for that, buddy!
 
reply
    Bookmark Topic Watch Topic
  • New Topic