Goddam motherfucking son-of-a-bitch Internet Explorer

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Goddam motherfucking son-of-a-bitch Internet Explorer

Post by Tdarcos »

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.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

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.

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

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 I tell people, these assist scripts can be very useful IF you need the functionality.

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."

Post Reply