Problem with Netscape

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

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

Problem 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>
JPlush76
Forum Regular
Posts: 819
Joined: Thu Aug 01, 2002 5:42 pm
Location: Los Angeles, CA
Contact:

Post by JPlush76 »

join the movement to quit coding for crappy netscape 4
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

This looks like a JavaScript problem not PHP.

Try this.....

Code: Select all

<script language="JavaScript"> 
<!-- 
function updateTextBox(selectObj, textBoxObj) 
&#123; 
    var index = eval("document.forms&#1111;0]."+selectObj+".selectedIndex"); 
    var selection = eval("document.forms&#1111;0]."+selectObj+".options&#1111;index].text); 

    eval("document.forms&#1111;0]."+textBoxObj+".value += selection + "\n"); 
&#125; 
// --> 
</script>
If that doesn't work then I suggest checking out a JS forum instead...
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't cross post.

Mac
Locked