In the midst of writing the Hugo Interpreter for the Web I'm being smashed head first into a new wall.
All of the references tell me the same thing, that if you end up with a return false event in Javascript it cancels the event, which means that if there is input placed into a text field and the user presses enter, this will cause the input to just be passed to a routine and the submit event is cancelled.
It's supposed to work in all browsers, and Firefox honors it. But not the bastard child of the Internet, Microsloth Internet Exploiter, which ignores the javascript and throws the event causing the page to be submitted, which is exactly what I did not want to happen. I want to process the input with the javascript function, then go back and ask for input again. Can fuckin' Internet Explorer just follow the rules like everyone else? Oh no, because that would mean things would work correctly on multiple systems and would reduce the need for Microsoft software, and of course, anything that reduces the demand for anything they make is a bad idea.
So for some reason the Javascript cancel of the submit event fails, and so it doesn't work, even though every web reference on how to suppress a submit event says it should work in Internet Explorer, it doesn't. Now I have to find out why it isn't working. So I'll try yet another test bed and see.
If this doesn't work then I have to throw yet another scenario away and go back to a PHP-based game system instead of implementing it in Javascript. Goddam bastard.
Goddam motherfucking son-of-a-bitch Internet Explorer
Moderators: Ice Cream Jonsey, joltcountry
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
Goddam motherfucking son-of-a-bitch Internet Explorer
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
As I tell people, these assist scripts can be very useful IF you need the functionality.bruce wrote:This is among the reasons that most people writing in Javascript use node.js or something, which, in addition to giving you a lot of convenience functions, abstract away the differences between browsers, so you don't have to.
As it turned out, I found the problem. I was using a variable that was not previously declared. Internet explorer didn't like this, while Firefox simply ignored it and created the variable.
It's up to the language designer, and there is a provision in "strict" javascript to require variable declaration before use.
And IE does have programmer tools, you just have to look a bit harder to find them.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."