Page 1 of 1

Problem with Netscape

Posted: Sat Jul 19, 2003 11:38 am
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>

Posted: Sat Jul 19, 2003 11:56 am
by JPlush76
join the movement to quit coding for crappy netscape 4

Posted: Sat Jul 19, 2003 11:57 am
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...

Posted: Mon Jul 21, 2003 3:34 am
by twigletmac
Please don't cross post.

Mac