What's wrong with Netscape

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

What's wrong with Netscape

Post by szms »

Hi there!!

I am using Netscape 4.8 for browsing the following code but it's not working but at the same time it's working in IE, Galeon and Mozilla. Could you plese let me know what I have to do in order to work it properly with Netscape.

Thank you.


<

Code: Select all

html> 

<head> 
<title>Option Selection and Submission...</title> 
<script type="text/javascript"> 
<!-- 
function updateTextBox(selectObj, textBoxObj) 
&#123; 
    var index = selectObj.selectedIndex; 
    var selection = selectObj.options&#1111;index].text; 

    textBoxObj.value += selection + "\n"; 
&#125; 
// --> 
</script> 
</head> 

<body> 
    <h1>Multiple User Selection Submission</h1> 
    <hr/> 

    <p>Make your selections below:</p> 
    <form name="selection_form"> 

        <?php  
        $Domain_Name&#1111;] = "Cricket";  
        $Domain_Name&#1111;] = "Soccer";  
        $Domain_Name&#1111;] = "Table Tennis";  
        $Domain_Name&#1111;] = "Chess";  
        ?>  
        <br> 
        <select size="5" name="user_choice" onclick="updateTextBox(this, currentSelections)"> 
        <?php  
            foreach ($Domain_Name as $Existing_Item) print " <option value="$Existing_Item ">$Existing_Item</option>";  
        ?>  
        </select> 

        <hr/> 

        <textarea name = 'currentSelections' readonly="readonly" rows = "20" cols = "45"></textarea> 
        <input type="submit" value="Submit" name="Submit"/> 
    </form> 


</body> 

</html>
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

Stop using NS 4.8. It will work then.
User avatar
Fredix
Forum Contributor
Posts: 101
Joined: Fri Jul 18, 2003 2:16 pm
Location: Wehr (Eifel) Germany
Contact:

Post by Fredix »

what is not working the HTML part or the JS?
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Post by szms »

I found one solution but not a very satisfactory one. If I use the latest version of Netscape for example 7.1 it's works perfectly. But still I want to know why it's not working in 4.7. Can any one tell me which least version of Netscape I need to use to activate this.

Thank you.
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

The reason that it does not work with NS 4.x is that back then, IE&NS used different syntaxes. The syntax that you have works with IE 5.x & 6.x, and NS 7.x+. They now conform to a standard.

In order to have it work with NS 4.x, you will need to have various cases to detect the type and version of the browser. Try hopping on google to find the necessary syntax to make stuff work under 4.x. I would list it for you, but it has been a long time since I have bothered supporting old browsers.
Skyzyx
Forum Commoner
Posts: 42
Joined: Fri Feb 14, 2003 1:53 am
Location: San Jose, CA

Re: What's wrong with Netscape

Post by Skyzyx »

szms wrote:Hi there!!

I am using Netscape 4.8 for browsing the following code but it's not working but at the same time it's working in IE, Galeon and Mozilla. Could you plese let me know what I have to do in order to work it properly with Netscape.

Thank you.
You need to understand something. Netscape 6.x and 7.x have zero to do with Netscape 4.x. Netscape 4.x had too many problems and flaws in it's implementations of things to count. So, Netscape's developers branched off into their own organization called Mozilla. The Mozilla team decided to completely and entirely re-write the entire codebase from scratch. Essentially, Netscape 6.0 was the very first release of a brand spankin' new web browser.

Now the core web rendering engine of Netscape 6 and later browsers is called "Gecko". Gecko is the core of several different browsers such as Netscape 6/7, Mozilla, Phoenix/Firebird, Chimera/Camino, Galeon, K-Melon, CompuServe 7.0, and AOL for Mac OS X, among others. They all render (display) webpages identically. Current versions of IE/Windows are much better than 5.x versions, but still has a variety of flaws in CSS and PNG support, and uses non-standard syntax for a variety of JavaScript and DOM features.

Netscape 4.x came out in 1997. Netscape 4.8 is based on that same 6-year-old codebase, and doesn't support 90% of the scripts that are currently available today, simply because it's too old. You cannot look at Netscape 4.8 as even a remote equal to today's web browsers.

Your best bets are to Google for Netscape 4.x syntax. I believe that Netscape's DevEdge website still has legacy information. Either that, or you can do what most of the rest of us do, and that is don't have this feature require JavaScript.

I could get into coding with web standards, but I just don't have the time right now. Do yourself a favor. If you are even remotely serious about doing web design on any level check out this book: Designing with Web Standards. The stress you'll be relieved from will add ten years to your life.
Post Reply