• 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

checkbox and popup

 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if it can be done:

I have a checkbox, if the initial state is unchecked, clicking
on it will bring up a popup window while the checkbox remains
unchecked. The parent window will be locked.

There are two buttons in the popup: "yes" and "no".
When "yes" is clicked, the popup is closed, the checkbox in
parent window will be checked, and parent window will be unlocked.
When "no" is clicked, the popup is closed,
the checkbox in parent window kept unchecked, and parent window will be unlocked.

When the initial state of the checkbox is checked, clicking on it
will uncheck it and no popup will show.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
making the parent locked can only be done in IE

The other parts is just if else with an onclick handler on the checkbox.

onclick="PopUp(this.checked)"


function would be


that is the basic idea....

Eric
 
John King
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric.

How do I pass the "yes" or "no" back to the checkbox in
the parent window?
 
reply
    Bookmark Topic Watch Topic
  • New Topic