Skip to content
Advertisement

window.onbeforeunload in Chrome: what is the most recent fix?

Obviously, window.onbeforeunload has encountered its fair share of problems with Chrome as I’ve seen from all the problems I’ve encountered. What’s the most recent work around? The only thing I’ve got even close to working is this: However, if I substitute return “alert” with something like alert(“blah”), I get nothing from Chrome. I saw in this question that Google purposefully

Get the id of input on keyup

I have an input box… When I type in the field, it will go to function lookup(). From there I want to get the id of this input. I tried… but this won’t work. Any suggestions on how I can get the id? Answer Because you are passing this.value to your lookup() function. It’s better to pass this to your

Dynamically disable select menu based on text field value

I’d like to be able to disable a select menu on my page when a user starts typing in a text field. This is because the text field is an alternative way to enter the data and disabling the dropdown menu will help make that clearer. I know I could use this: to disable the select permanently, but is there

Advertisement