Net4TV
Front
News
Features
Op n' Ed
Voxpop
Community
Archive
Subscription


Switch background color
<IMG SRC="graphics/section/voice_voice.jpg" Width="448" Height="90" border=0>
Feature
Upgrade Remedies:
Fix your IRC


By VBScript
(June 4, 2000)

The Summer 2000 WebTV Upgrade was more than likely the most eagerly awaited service update in the history of WebTV. Sadly, the same update that finally brings Instant Messaging and RealAudio G2 to WebTV also brings along some nasty, and mostly unpredictable, changes and bugs.

The extremely popular custom WebTV IRC interfaces (IRCs) seemed to be hit the hardest. As soon as users started accepting the free update, bug reports started pouring in. IRCs were simply just reloading when the chat text field was clicked. Also, if by chance the IRC actually worked, the cursor would disappear whenever any text was sent to chat.

Even more frustrating, the dreaded Audio Bug, that once only affected WebTV Plus users, started affecting all upgraded boxes. As soon as someone would click the text input to chat, their favorite song or RealAudio clip would be interrupted.

Luckily, I have one simple script that fixes all of these IRC problems:

<form name="FORMNAME" onsubmit="CHATFUNCTION(); document.FORMNAME.INPUTNAME.focus(); return false"> <input name="INPUTNAME" action="javascript:void()//" onClick="CHATFUNCTION()"> </form>

Now, to break that script down a bit: The FORM and INPUT tags in your IRC probably have "name" attributes already. Just put their values in place of "FORMNAME" and "INPUTNAME", respectively. Similarly, you would put your normal chat JavaScript function in place of "CHATFUNCTION()". Notice that these appear twice each in the script, which means they will also need to be replaced twice.

*** Make sure you keep "return false" at the end of the "onsubmit" attribute, as well as action="javascript:void()//" in the INPUT tag. These are extremely important in keeping your IRC 100% free of the Audio Bug. "document.FORMNAME.INPUTNAME.focus()" sends the cursor focus back to the chat input after text is sent, which keeps the cursor from disappearing (thanks Diane Dumas). That part is optional, but helpful. ***

You may notice that the new Audio Bug fix is very similar to an old Audio Bug fix that I released a while back, with the exception of the "onsubmit" attribute. Upgraded boxes no longer support "onclick" or "action" in the INPUT tag. Therefore, the upgrade Audio Bug fix lies in the FORM tag, while the old Audio Bug fix (for boxes without upgrades) lies in the INPUT tag.

Another JavaScript bug occurs with quite a few "Custom Popups" on IRCs (basically, links that people can click on to send a message). It brings you to a blank screen with weird code in the top-left corner, as well as in the status bar. As long as you follow this example when making JavaScript links, you stand a good chance of getting the result you want:

<a href="javascript:void()//" onClick="FUNCTIONHERE()">LINK TEXT

Make sure you keep "javascript:void()//" in the link's "href" attribute. This stops all unwanted output from the link when the JavaScript function is called. Replace "FUNCTIONHERE()" with whatever JavaScript function you wish. Also, change "LINK TEXT" to the text string you would like to make clickable. This fix also seems to stop a similar bug from messing up your "window.open()" command. For example, the following code should bring up the chat whisper message window:

<a href="javascript:void()//" onClick="window.open('whisper.panel')">Open Whisper Panel

Although it would be nice to have a Bug Fix handy for this next problem, I apologize that I do not. On at least an old, upgraded Philips WebTV Classic that we tested on, the "instructions" and "credits" attributes in the BODY tag of a document do not work correctly at all. A simple page with a custom "Instructions" button on the info panel, that would take a user to "help.html", would have looked like this:

<body instructions="help.html">

Now, there are two "Instructions" buttons instead of just one, and when you click an "Instructions" button, it never goes to the "help.html" page. Before the upgrade, one could even use a "javascript:command()//" in the "instructions" attribute. Now, after the upgrade, that brings up even more problems. I strongly urge that you not use this type of code at all.

Lastly, a somewhat small (but completely ridiculous) Bug causes a few JavaScript Math functions to calculate improperly. Let's say, on one side, that you have a number that is an integer (such as 5). On the other side, you have a floating point number (a number with a decimal part) who's integer part is the same as your first number (such as 5.7). Upgraded WebTV thinks these two numbers are equal. Take this script for example:

<script>
alert(1 == 1.1);
alert(5.3 == 5);
alert(3.0 == 3.8);
</script>

Each JavaScript popup alert will say "true" on an upgraded WebTV, which is very wrong. Each should say "false". To make matters worse, even though WebTV wrongly makes the assumption that the above numbers are equal, it does in fact know if one is bigger, or less than, the other. You can use this to your advantage though. If you check if two numbers are equal, as well as check if one number is not bigger or smaller than the other, you may be able to create your own workaround to this problem, such as:

<script>
if (1 == 1.1 && !(1 < 1.1)) {
alert("Woohoo!");
}
</script>

This literally says "If 1 equals 1.1, but 1 is not less than 1.1, then create the popup alert saying 'Woohoo!'".

Obviously, I can't expect everyone to understand everything that I have said here, but I am confident that most people will find at least something here useful. Please, let us know if this info helped, or even if it made things worse for you; or better still, if you find a new WebTV Bug that we haven't covered here.

Note: The notorious Script Error bug, or "Fritz", which forces some scripts to load wrong on pages viewed on WebTV, still exists, even after the Summer 2000 upgrade. Evidence shows that this bug is actually server-side, and not client-side at all. This means that WebTV has the power to fix the problem almost overnight, without even issuing another upgrade (food for thought!).


To Top of Page

Welcome to Net4TV Voice
Meet your fellow users who create
Net4TV Voice in the Masthead.

View our Privacy Policy.


Net4TV, Net4TV Voice, Chat4TV, and Surfari
are trademarks of Net4TV Corporation
© 1998 - 2001, Net4TV Corporation. All Rights Reserved.