SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Closing a popup triggers confirm?

    Is there a way to trigger a confirm (or anything else) if a user clicks the "x" in the browser chrome instead of using the "close window" link you provide?

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why?

    Does this involve a form?
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. It's a multipart form with tabs. I was thinking I'd like to save the data in a session variable and then wait to send it to the database at the end. However, if the user tries to x out of the window before they finish the whole form, I want to ask them if they want to save what they've done so far.

    It's here -- click on the "Add Clients" icon (the plus sign after the word Clients). It's still very rough, but you'll get the idea.

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad to see your markup is fairly well written. You seem to be using <label> and <fieldset> elements appropriately, except that the you used the label for gender incorrectly. One label should be associated with each radio button, not one for the group.

    You do have some non-unique IDs though, which you should fix.

    Why did you disable the scrollbars?

    As to your question, this thread should be helpful: Prevent losing updated form data
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link. I've got some studying to do! LOL

    Thanks also for the tip about the radio buttons. I knew I still had some non-unique IDs I needed to clean up, but I didn't know that each radio button needed its own label.

    About the scrollbars . . . they're not supposed to be disabled and I've been pulling my hair out trying to figure out what's causing them to not appear. I don't know if it's a javascript thing or something in my CSS or HTML. Here's the open window script, though. It looks ok, right?

    Code:
    function newSmallWin(url){
    	window.open(url, "popup", "resizable=1, width=580px, height=620px, status=no, top=20px, left=20px, scroll=yes");
    	}

  6. #6
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome

    Change "scroll=yes" to "scrollbars=yes".
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  7. #7
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ooooh . . . thank you thank you thank you! I honestly spent about an hour this morning trying to track that one down with no success! LOL

  8. #8
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome

    I thought scroll=yes looked wrong, so I looked it up.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •