Still can't get Netscape 6 to render this correctly.

Discussion in 'Javascript' started by Zambien, Oct 7, 2004.

  1. Zambien

    Zambien Guest

    Well, it's been about a week and I still can't figure this problem
    out. I've cut the html down to it's bare minimum and when I click on
    the select buttons in NS, the table gets all skewed. I've changed
    everything I can think of on the page and it's still not right.
    Here's the cut down html if anyone will please look at it.


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

    <html>
    <head>
    <title>Investment Transfer</title>
    <script language="javascript1.1" src="js/ua.js"></script>
    <script language="javascript1.1" src="js/styleLF.js"></script>
    <script language="javascript1.1" src="js/source_popup.js"></script>
    <script language="javascript1.1" src="js/prod_popup.js"></script>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var param = "";

    function showNextFrame() {

    // Make sure the bottom frame is blank
    // Submit the form
    document.FundToFundTransferForm.submit();
    }

    function clearOtherFrames() {

    }

    function handleFromRadioButton(prodcode, sourcecode) {

    document.FundToFundTransferForm.prd_code.value = prodcode;
    document.FundToFundTransferForm.src_code.value = sourcecode;
    showNextFrame();
    }
    function setFrmHeight(){


    }
    // -->
    </SCRIPT>

    <SCRIPT LANGUAGE="JavaScript">

    function showStep2() {
    document.step2.visibility='show';
    }

    function handleSelectButton(prodcode, id) {

    clearOtherFrames();
    expandMenu(prodcode);
    setFrmHeight();
    var x = document.getElementById(id).offsetLeft;
    var y = document.getElementById(id).offsetTop;
    //alert('id= ' + id + ' x=' + x + ' y=' + y);
    scroll(x,y);
    }

    function expandMenu(prodcode) {

    var closed = new Image();
    closed.src = "images/select_button.gif";
    var opened = new Image();
    opened.src = "images/select_disabled_button.gif";

    if(prodcode == "HJ") {
    document.getElementById("menu_row1_HJ").src = opened.src;
    document.getElementById("sm_row1_HJ_0").style.display = "block";
    document.getElementById("sm_row2_HJ_0").style.display = "block";
    // ensure radio button is not checked
    document.getElementById("sm_radio_HJ_0").checked = "";
    document.getElementById("sm_row1_HJ_1").style.display = "block";
    document.getElementById("sm_row2_HJ_1").style.display = "block";
    // ensure radio button is not checked
    document.getElementById("sm_radio_HJ_1").checked = "";
    }
    else {
    document.getElementById("menu_row1_HJ").src = closed.src;
    document.getElementById("sm_row1_HJ_0").style.display = "none";
    document.getElementById("sm_row2_HJ_0").style.display = "none";
    document.getElementById("sm_row1_HJ_1").style.display = "none";
    document.getElementById("sm_row2_HJ_1").style.display = "none";
    }

    if(prodcode == "93") {
    document.getElementById("menu_row1_93").src = opened.src;
    document.getElementById("sm_row1_93_0").style.display = "block";
    document.getElementById("sm_row2_93_0").style.display = "block";
    // ensure radio button is not checked
    document.getElementById("sm_radio_93_0").checked = "";
    document.getElementById("sm_row1_93_1").style.display = "block";
    document.getElementById("sm_row2_93_1").style.display = "block";
    // ensure radio button is not checked
    document.getElementById("sm_radio_93_1").checked = "";
    }
    else {
    document.getElementById("menu_row1_93").src = closed.src;
    document.getElementById("sm_row1_93_0").style.display = "none";
    document.getElementById("sm_row2_93_0").style.display = "none";
    document.getElementById("sm_row1_93_1").style.display = "none";
    document.getElementById("sm_row2_93_1").style.display = "none";
    }
    }

    function hideAllSubMenus() {

    var closed = new Image();
    closed.src = "images/select_button.gif";
    var opened = new Image();
    opened.src = "images/select_disabled_button.gif";


    document.getElementById("menu_row1_HJ").src = closed.src;
    document.getElementById("sm_row1_HJ_0").style.display = "none";
    document.getElementById("sm_row2_HJ_0").style.display = "none";
    document.getElementById("sm_row1_HJ_1").style.display = "none";
    document.getElementById("sm_row2_HJ_1").style.display = "none";

    document.getElementById("menu_row1_93").src = closed.src;
    document.getElementById("sm_row1_93_0").style.display = "none";
    document.getElementById("sm_row2_93_0").style.display = "none";
    document.getElementById("sm_row1_93_1").style.display = "none";
    document.getElementById("sm_row2_93_1").style.display = "none";

    }

    function clearOtherFrames() {

    }

    function doOnLoad() {
    //initArray();
    hideAllSubMenus();
    clearOtherFrames();
    }

    // End -->
    </script>


    </head>

    <body onload="setFrmHeight();doOnLoad()">
    <form name="FundToFundTransferForm" method="post" target="frame2"
    action="fundToFund2.do">

    <input type="hidden" name="src_code" value="">
    <input type="hidden" name="prd_code" value="">
    <input type="hidden" name="src_name" value="">
    <input type="hidden" name="prd_name" value="">

    <table border="0" cellspacing="0" cellpadding="0">
    <!--width="625"-->
    <tr>
    <td id="button_locationHJ" colspan="7">
    <IMG SRC="images/spacer.gif" HEIGHT=5 BORDER=0 ALT=""></td>
    </tr>
    <tr class="menu1">
    <td colspan="2">&nbsp;</td>
    <td width="80" align="left" valign="bottom"><img id="menu_row1_HJ"
    src="images/select_button.gif"
    onClick="handleSelectButton('HJ', 'button_locationHJ')" border="0"
    /></td>
    <td width="250"> <STRONG><a href="javascript:prodPopUp('HJ')">
    EMPLOYEE ENTERGY STOCK</a></STRONG></td>
    <td width="80" align="left"><STRONG>37.4311</STRONG></td>
    <td width="160" colspan="2"
    align="left"><STRONG>$2,049.35</STRONG></td>
    </tr>
    <tr>
    <td colspan="7"><IMG SRC="images/spacer.gif" WIDTH=400 HEIGHT=5
    ORDER=0 ALT=""></td>
    </tr>
    <tr class="submenu" id="sm_row1_HJ_0">
    <td colspan="3">&nbsp;</td><td width="250" align="left"
    valign="bottom">
    <input type="radio" name="nothing" value="*"
    onclick="handleFromRadioButton('HJ', '*')"
    disabled="disabled" id="sm_radio_HJ_0">
    <STRONG>&nbsp;
    ALL SOURCES
    </STRONG></td>
    <td width="80" align="left">37.4311</td>
    <td width="90" align="left">$2,049.35</td>
    <td width="70" align="left">&nbsp;</td>
    </tr>
    <tr class="submenu" id="sm_row2_HJ_0"><td colspan="6"><IMG
    SRC="images/spacer.gif" WIDTH=400 HEIGHT=5 BORDER=0 ALT=""></td></tr>
    <tr class="submenu" id="sm_row1_HJ_1">
    <td colspan="3">&nbsp;</td><td width="250" align="left"
    valign="bottom">
    <input type="radio" name="nothing" value="4"
    onclick="handleFromRadioButton('HJ', '4')"
    disabled="disabled" id="sm_radio_HJ_1">
    <STRONG>&nbsp;
    COMPANY MATCH-0.70
    ONLY
    </STRONG></td>
    <td width="80" align="left">37.4311</td>
    <td width="90" align="left">$2,049.35</td>
    <td width="70" align="left">&nbsp;</td>
    </tr>
    <tr class="submenu" id="sm_row2_HJ_1"><td colspan="6">
    <IMG SRC="images/spacer.gif" WIDTH=400 HEIGHT=5 BORDER=0
    ALT=""></td></tr>
    <tr>
    <td id="button_location93" colspan="7"><IMG SRC="images/spacer.gif"
    HEIGHT=5 BORDER=0 ALT=""></td>
    </tr>
    <tr class="menu1">
    <td colspan="2">&nbsp;</td>
    <td width="80" align="left" valign="bottom"><img id="menu_row1_93"
    src="images/select_button.gif"
    onClick="handleSelectButton('93', 'button_location93')" border="0"
    /></td>
    <td width="250"> <STRONG><a href="javascript:prodPopUp('93')">
    BLUE CHIP GROWTH FUND</a></STRONG></td>
    <td width="80" align="left"><STRONG>1,113.2650</STRONG></td>
    <td width="160" colspan="2"
    align="left"><STRONG>$30,859.70</STRONG></td>
    </tr>
    <tr>
    <td colspan="7"><IMG SRC="images/spacer.gif" WIDTH=400 HEIGHT=5
    ORDER=0 ALT=""></td>
    </tr>
    <tr class="submenu" id="sm_row1_93_0">
    <td colspan="3">&nbsp;</td><td width="250" align="left"
    valign="bottom">
    <input type="radio" name="nothing" value="*"
    onclick="handleFromRadioButton('93', '*')"
    disabled="disabled" id="sm_radio_93_0">
    <STRONG>&nbsp;
    ALL SOURCES
    </STRONG></td>
    <td width="80" align="left">1,113.2650</td>
    <td width="90" align="left">$30,859.70</td>
    <td width="70" align="left">&nbsp;</td>
    </tr>
    <tr class="submenu" id="sm_row2_93_0"><td colspan="6">
    <IMG SRC="images/spacer.gif"
    WIDTH=400 HEIGHT=5 BORDER=0 ALT=""></td></tr>
    <tr class="submenu" id="sm_row1_93_1">
    <td colspan="3">&nbsp;</td><td width="250" align="left"
    valign="bottom">
    <input type="radio" name="nothing" value="A"
    onclick="handleFromRadioButton('93', 'A')" id="sm_radio_93_1">
    <STRONG>&nbsp;
    BEFORE-TAX
    ONLY
    </STRONG></td>
    <td width="80" align="left">816.7870</td>
    <td width="90" align="left">$22,641.34</td>
    <td width="70" align="left">&nbsp;</td>
    </tr>
    <tr class="submenu" id="sm_row2_93_1"><td colspan="6"><IMG
    SRC="images/spacer.gif"
    WIDTH=400 HEIGHT=5 BORDER=0 ALT=""></td></tr>
    </table>
    </form>
    </body>
    </html>
     
    Zambien, Oct 7, 2004
    #1
    1. Advertising

  2. Zambien wrote:


    > document.getElementById("sm_row1_HJ_0").style.display = "block";


    > <tr class="submenu" id="sm_row1_HJ_0">


    The correct CSS 2 display value for a HTML table row is not "block" but
    "table-row", see
    http://www.w3.org/TR/CSS21/visuren.html#display-prop
    The only problem is that IE/Win doesn't know that value so you need to
    make sure that you get the different browsers to use the right value.
    You can usually get away with
    element.style.display = 'none';
    to hide an element with script and
    element.style.display = '';
    to show an element as that way the default style sheet kicks in and the
    browser uses the proper value without there being any need for your
    script to figure whether you want to show a block or a table-row or
    anything else.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Oct 7, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Boris Zakharin
    Replies:
    0
    Views:
    330
    Boris Zakharin
    Aug 6, 2003
  2. Lau Lei Cheong

    Page.Render do not render complete page

    Lau Lei Cheong, May 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,101
    Lau Lei Cheong
    May 15, 2004
  3. Peter Styk

    UTF-8 in ASCX will not render correctly

    Peter Styk, Jan 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    667
    Peter Styk
    Jan 12, 2005
  4. =?Utf-8?B?R3JhaGFt?=

    Checkbox control - won't render attributes correctly

    =?Utf-8?B?R3JhaGFt?=, Aug 16, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    543
    =?Utf-8?B?R3JhaGFt?=
    Aug 16, 2005
  5. Glenn Gillen
    Replies:
    0
    Views:
    309
    Glenn Gillen
    Nov 17, 2006
Loading...

Share This Page