Results 1 to 6 of 6

Thread: DHTML window widget - problem selecting "select" options in firefox

  1. #1
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML window widget - problem selecting "select" options in firefox

    1) DHTML dynamic window

    2) http://www.dynamicdrive.com/dynamici...ndow/index.htm

    I've posted it as a question at the help forum, but decided it is probabaly a bug, so I'm posting also here.
    I'm using the dynamic window with ajax.
    The window content includes a select element. Only the first 20 elements can be selected. scrolling down the options, and selecting for example the first SEEN option, will result with selecting the first option in the list (in oppose to the first option seen after scrolling down).
    The problem occurs on FireFox 1.5.0.11 but not on IE7.

    Here's my code:

    test.php:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- DHTML windows -->
    <link rel="stylesheet" href="src_3rdParty/client/windowfiles/dhtmlwindow.css" type="text/css" />
    <script language="Javascript" type="text/javascript">
    function openWindow()
    {
    // create the path for registerPage.php
    var path = location.href;
    var index = path.indexOf("test.php");
    path = path.substr(0,index)+"windowBox.php";
    var dynamicWindow = dhtmlwindow.open('windowBox', 'ajax', path, 'dynamic window', 'width=650px,height=400px,center=1,resize=0,scrolling=0');
    return false;
    }

    </script>
    <script type="text/javascript" src="src_3rdParty/client/windowfiles/dhtmlwindow.js">
    /***********************************************
    * DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    </script>


    <!-- end of DHTML windows -->
    </head>
    <body>
    <button onClick="openWindow();" >open window</button>
    </body>
    </html>

    window content - windowBox.php:
    <?php
    echo '<select name="BirthYear" size="1"></br>';
    for ($i =1900; $i<2006;$i++)
    {
    echo '<option value = "' . $i .'">'.$i.'</option></br>';
    }
    echo '</select>';
    ?>

  2. #2
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi there,

    I'm experiencing the exact same problem. A little troublesome.

    Did you get a resolution/work around to the problem?

    SmokinJoe

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    For anyone with a similar problem the solution is.....

    .... upgrade Firefox to version 3!!! Grab a nightly build until the GA for that.

    SmokinJoe

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The script should be compatible with FF2. Upgrading the browser only fixes for you, not your visitors.

    Is this a problem with the script in the first place or only in the specific implementation on your site(s)?

    In other words, does the same problem occur if you use the demo page (altered to have a longer dropdown, as needed)?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have also same problem with dynamic window.
    Only the first 20 options in select element can be selected when using FF2.

  6. #6
    Join Date
    Jun 2008
    Location
    Hellendoorn, Netherlands
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I found the same problem. It looks like a Firefox 2 problem because Firefox 3 and IE doesn't have any problems with it.

    I don't know when is happens exactly ,but i found it only happens when you set some (css) class as attribute.

    A possible solution can be is to is add the class(es) after generating the selectbox. Then the problem doesn't occur anymore

    The example is an ugly one, but you can do this on a better (cleaner) way. This is only for example.

    So change:
    Code:
    <select name="aName" id="aName" class="selectbox">
         <option>abc</option>
         <option>def</option>
         <option>zxv</option>
    </select>
    To:
    Code:
    <select name="aName" id="aName">
         <option>abc</option>
         <option>def</option>
         <option>zxv</option>
    </select>
    <script language="text/javascript>
        document.getElementById('aName').className = 'selectbox';
    </script>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •