|
0zzyRocks posted:I need to have the user decide whether they want to save data on a webapp before navigating away. I wanted to use my own confirm window so I could capture what button was clicked. Is there a way to capture the button clicked on the default beforeunload event popup? So, you don't want to prevent them from leaving, but you want to prompt them to save before leaving, right? How about this? code:
|
# ¿ Jun 18, 2009 06:03 |
|
|
# ¿ Apr 30, 2024 01:20 |
|
ronin109 posted:What Ether Frenzy needed was a button that could (a) contain an image, and (b) submit it's parent form (without the use of JS). Doesn't this have the same effect? (except not having the user see "mysubmit.x=20&mysubmit.y=30") code:
|
# ¿ Jul 15, 2009 09:46 |
|
ronin109 posted:Just one teeny-tiny addition to your solution would be the inclusion of "background-color: transparent". Ah, right... drat rounded buttons. I must have missed SuckerPunched's post when I made mine because he included that part. His is nice too because it's still usable when they don't load your stylesheet for some reason, although it's missing the width/height attributes on the button. The only thing I'm not sure of is what happens when the height of the image is less than the height of the text. Although the text is being indented out of view and the height attribute is fixed, would it still stretch to fit the text? I don't have all the major browsers available to me right now so I'm not sure.
|
# ¿ Jul 22, 2009 05:20 |
|
Lumpy posted:I love working with people who literally say "well, javascript isn't a real language, so I'm not going to bother learning it; I just need to hack this out and I'll never have to use JS again." Despite having said that for the first time two years ago and having to work with JS more than any other language. +1. For some reason so many of my colleagues think JavaScript is "dirty" and everything you do in it is a hack. When a client asks for a complex UI they panic. And they think nothing of writing something like: code:
Functions as first class objects is enough for me to take JS seriously. If you're used to working with a stricter language like Java, that concept is so refreshing and awesome. It really changes the way you think about programming in general.
|
# ¿ Sep 2, 2010 05:58 |