4/26/2006

IE 7.0 Beta 2 - 64-Bit Nuclear Meltdown? And Firefox Javascript

I guess I'm just a sucker for BETA software. At work, I installed the latest "offishul" Interenet Explorer 7 Beta 2 and it seems to work fine. I especially like the RSS stuff and the tabbed browsing.

So when I got home last night, I said "OK, they finally have a real 64-bit version so let's have fun". Bad decision!


At least on my AMD machine running Windows Server 2003 x64 edition, this puppy is an absolute "NO GO". Just trying to set Toolbar settings and common properties, the windows would freeze up and refuse to close, and I'd have to kill the sucker out of Task Manager. It didn't take me more than about 20 minutes of wasted time to realize I had made a big mistake, and it was "bye - bye, IE 7".

I'm not even going to take the time to put in bug reports on something this bad - I got work to do.

You know, I understand this is BETA software. But at a minimum, there is a certain presumption of basic functionality before you even release it to the public. I guess I'll just wait.


Somebody tell me they are running the 64-bit IE 7.0 on their AMD machine on Windows Server 2003 x64 and its fine, and that I am just an unlucky nerd who got a bad configuration.

N.B. 5/15/2006: After a week to calm down, and a few Registry tweaks, I reinstalled IE 7.0 Beta 2 64 bit and I'm happy to report that she is fine.


This just in - Firefox supports Javascript!


You know, I thought that standards were supposed to be a unifying force, but after struggling with Firefox and javascript trying to make what would seem to be the simplest challenge to work, I've just about given up.

On eggheadcafe.com we have a searchbox on the upper right with a button to "Search Related". The code for it is pretty simple:


<input type=text onkeydown="searchRelated();" id=searchRelatedText
name=searchRelatedText
size="12" maxlength="50"><BR/>
<a href="javascript:searchRelated();"><img src="blah/submit.jpg"
border="0">
<script>
function searchRelated()
{
if(event!==null && event.keyCode!=13 )
{
return;
}
else
{
srch=document.getElementById('searchRelatedText').value;
srch='site:eggheadcafe.com '+srch;
window.open('SeachRelated/SearchRelated.aspx?q='+srch,
null, 'left=500;toolbar=0,scrollbars=1,location=0,statusbar=0,
menubar=0,resizable=1,width=500,height=800');
}
}
</script>



The net effect of the "If(event...) code is that it doesn't matter if you click the Search Button with your mouse or press the ENTER key while you are still in the input textbox, control will fall through to the else block and the search is done. Now this doesn't work with Firefox, (obviously) because it doesn't support "event" - you have to wire up other code, In fact, you have to wire up about 5 different "Tests" to accomodate most of the browsers! But after trying out about half a dozen sample "so called cross-browser" scripts designed to simply catch the "enter key" as input into a TextBox, I give up. Most of them revolve around submitting a form. I'm not using a form here, I'm catching a keypress or keydown event in a textbox and checking to see if the return key was pressed. If so, I consider the entry complete and I open a popup window, passing my adjusted URL into it. Jeesh! The problem is you still have five different browsers doing this their own fyookin' way, and you have to go bonkers writing spaghetti Javascript code to satisfy all of them. And you know what? I can't be bothered with this SHIT!

That's not my only complaint about Firefox, but its one of the biggest. It causes you to go through incredible contortions because of the ultra-strict interpretation of Javascript that's built into it. You can't make cross-site XMLHTTPRequests either. In IE, if the site is in the trusted sites list, you can. But FIrefox? Oh, no! We don't trust you, Mr. Joe Internet User, so we are gonna just cut your balls off on you in advance, just on principle, regardless of what you want to do.

Doesn't make much sense to me. Firefox is really a nice browser, but it's a bitch and a half to get it to do some of the simplest things with plain old script.

N.B. I finally did figure out a way to do it:

<input type=text onkeydown="searchRelated(event);"
id=searchRelatedText
name=searchRelatedText size="12" maxlength="50"><BR/>
<a onclick="javascript:doSearch(event);">
<img src="http://blah/submit.jpg" border="0"></a>
<script>
function searchRelated(e)
{
if (!e) var e = window.event;
if (e.keyCode == 13)
{
doSearch();
}
}
function doSearch()
{
srch=document.getElementById('searchRelatedText').value;
srch='site:eggheadcafe.com '+srch;
window.open('http://theurl/SearchRelated.aspx?q='+srch,
null, 'left=500;toolbar=0,scrollbars=1,
location=0,statusbar=0,
menubar=0,resizable=1,width=500,height=800');
}
</script>