Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Browser problem (Netscape)

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Browser problem (Netscape)

Postby szms » Sat Jul 19, 2003 11:23 am

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. Coule you plese let me know what I have to to 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)
{
    var index = selectObj.selectedIndex;
    var selection = selectObj.options[index].text;

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

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

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

        <?php
        $Domain_Name[] = "Cricket";
        $Domain_Name[] = "Soccer";
        $Domain_Name[] = "Table Tennis";
        $Domain_Name[] = "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>
szms
New php-forum User
New php-forum User
 
Posts: 10
Joined: Thu Jun 26, 2003 7:42 am

Re: Browser problem (Netscape)

Postby swirlee » Sat Jul 19, 2003 11:55 am

szms wrote: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.


Please give us a better description of what you mean by "not working". There's a 98% chance (probably higher) that this is a JavaScript problem and not a PHP problem, but "not working" isn't terribly descriptive. Does the page come up blank, or does just a certain part not work? Are you getting JavaScript errors? Does your JavaScript work in a static page on NS4.8 (e.g. not generated by PHP)? What is the complete HTML output of your PHP script?

Alright, I did 30 seconds worth of Googling for you and found that selectObj.value isn't supported by NS4, so that seems like a pretty good candidate, huh? Check out this page for a possible alternative.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 9 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron