Game Development Community

[Bug Beta 5] function gotoWebPage( %url ) not compatible with IE 8

by JesseL · in Torque 3D Professional · 08/13/2009 (10:13 pm) · 3 replies

As a Indie Developer I must include in my about page a link to www.garagegames.com. So I figured I would make it a button. I tell the button to do the command gotowebpage(www.garagegames.com) and all it does is open up an empty webpage. This was not the intended effect I was going for here. I understand that doing gotowebpage(http://www.garagegames.com) works as intended.

About the author

I just realized that if I wanted to create a cat that caught on fire and ran up a telephone pole and then burst into a blue waterfall. That wouldn't be to hard!


#1
08/14/2009 (9:36 pm)
Is this really a bug? As far as any browser cares "www.garagegames.com" is not a valid URL, while "http://www.garagegames.com" is. When you enter a URL minus the http:// into the search bar and hit enter/go the browser adds that to your URL as that is the most common beginning bit, but that's still not guaranteed as IE regularly tries to search for the words you entered as it doesn't realise it's a web URL without the http:// bit. Perhaps gotowebpage should check to see if there is a http://, ftp://, https://, or one of the many other possible URL opening flags and add http:// if there isn't one, but really that's just being lazy and adding work for the GG devs.
#2
08/14/2009 (10:13 pm)
Well Bryan can you read C++ code. Perhaps you could look at the code and tell me why it says it does a check for http:// but for some reason it doesn't work?
#3
08/15/2009 (10:16 am)
Well, I don't really know what to say. The code is definitely in place to add the protocol seperator and it definitely works with and without one if you enter the command into the console. I couldn't get it to open in IE as even though IE was set as my default it opened in firefox instead so I don't know if that's your problem or not. I did find that sticking it in the command variable of a button could lead to problems as it doesn't seem to like it and leads to parsing errors. I suggest create a new function to stick in the command variable instead. For instance create the function:
function gotoGG(){
gotowebpage("http://www.garagegames.com");
}

and then in your button:
new GuiButtonCtrl() {
...
Command = "gotoGG();";
...
}

Otherwise you would need to do something like
Command = 'gotowebpage("http://www.garagegames.com");';
which resulted in a parser error every time I tried it. Note that you shouldn't need the http:// protocol seperator as it definitely does fix the URL when reading it into the engine, but since you won't need to ever write the URL again it's not like it's a big deal to type those extra 7 characters.