Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    #$*&(@*&! Netscape!!

    I'm working on a data entry/reporting web site that needs to be functional in Netscape 4.7, 6.2 and IE 5.x. I'm going nuts with the things I have to change to get it to even display right on 4.7. N6.2 isn't so bad but there are some formatting issues.

    Does anyone have any tips, hints, guiding forces that will help me with this??? There are lots of forms b/c of it being a data entry site. It is for a non-profit govt agency so I have to make it ADA (American Disabilities Act) compliant as well.

    The biggest thing I have right now is hiding textboxes. I have the boxes coded like "< input type="textbox" style="VISIBILITY: hidden;" >. In N6.2, it hides the boxes. In N4.7, it shows them.

    Thanks for any help.
    Dia

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if (Browser=="Netscape" && Version<6.0)
    alert("Your browser is outdated, upgrade required")

    Here is the link that should help with ADA compliance
    http://www.w3.org/TR/REC-CSS2/aural.html
    Last edited by Vladdy; 09-06-2002 at 07:08 PM.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You cannot hide form fields in Netscape 4. Think in terms of "degrading gracefully" for Netscape 4 instead of trying to make that antique pig of a browser match the newer browsers (which it can't and won't).

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Roy Sinclair
    You cannot hide form fields in Netscape 4.
    Yeah you can

    Code:
    <html><head></head><body>
    
    
    
    
    <div id="formDiv" style="position:relative">
    <form>
    <select>
    <option>xxx   xxx   xxx</option>
    <option>xxx   xxx   xxx</option>
    <option>xxx   xxx   xxx</option>
    <option>xxx   xxx   xxx</option>
    </select>
    </form>
    </div>
    
    <script language="javascript">
    
    function hideFormDiv() {
    
    	if(document.layers) {
    		document.layers["formDiv"].visibility = "hide";
    		}
    	else if (document.all) {
    		document.all["formDiv"].style.visibility = "hidden";
    		}
    	else if (document.getElementById) {
    		document.getElementById("formDiv").style.visibility = "hidden";
    		}
    	}
    
    </script>
    
    <p><a href="java script:hideFormDiv()">hideFormDiv()</a>
    
    </body></html>

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by brothercake


    Yeah you can
    ...

    No, you can't. You can hide a whole layer and that layer can contain a form (not a form field, it must be a whole form) but you cannot hide a single form field.

    Of course you can put all the fields you want to hide inside layers but then you also have to extract the data from those fields and place their values into the real form when you submit.

    The bottom line is that's a lot of extra coding just to handle one really, really, really defective browser. I prefer "degrading gracefully" to excessive coding.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    As observed, you can certainly do this in Navigator. I've done it any number of times. My advice: don't! (unless you have no choice). Here's why: NS4 Layers, necessary to show/hide elements, have their own (sub-)documents; HTML forms can't 'straddle' documents; so, you'll need to put every hideable field in its own <form></form> container, in its own <layer></layer> and - if you want it relatively positioned, inside an additional <ilayer></ilayer> wrapper. Heard enough? There's more: now you've got forms galore; you'll need to gather the data into one big 'hidden' form and submit that.

    No sense name-calling - this is an ancient (1997) item, built well before the current W3C specs were agreed on; it is what it is. As noted - the above is doable; if you try it, forget about cross-browsering and use server or client-side detects to deliver a NS4-specific page to the user.


    <html>
    <head>
    <title>untitled</title>
    <script type="text/javascript" language="javascript">

    function show(id) {
    document[id].document.layers[0].visibility = 'show';
    }

    function hide(id) {
    document[id].document.layers[0].visibility = 'hide';
    }

    function setThis(f) {
    var el;
    for (var i=0; i<document.layers.length; ++i) {
    el = document.layers[i].document.layers[0].document.forms[0].elements[0];
    f.elements[el.name].value = el.value;
    }
    }

    function uncheckem() {
    for (var f=0; f<document.forms.length; ++f)
    for (var e=0; e<document.forms[f].length; ++e)
    if (document.forms[f].elements[e].type == 'checkbox')
    document.forms[f].elements[e].checked = false;
    }

    onload = uncheckem;

    </script>
    </head>
    <body>
    <table>
    <tr>
    <td>
    <form>
    <input type="checkbox" onclick="this.checked?show('t1'):hide('t1')"> show t1
    </form>
    </td>
    <td><ilayer id="t1">
    <layer visibility="hide">
    <form>
    <input name="t1" type="text">
    </form>
    </layer></ilayer></td>
    </tr>
    <tr>
    <td>
    <form>
    <input type="checkbox" onclick="this.checked?show('t2'):hide('t2')"> show t2
    </form>
    </td>
    <td><ilayer id="t2">
    <layer visibility="hide">
    <form>
    <input name="t2" type="text">
    </form>
    </layer></ilayer></td>
    </tr></table>
    <!-- hidden fieldnames same as 'layered' fieldnames -->
    <form name="hiddenForm" method="get" onsubmit="setThis(this)">
    <input name="t1" type="hidden">
    <input name="t2" type="hidden">
    <input type="submit" value="DONE">
    </form>
    </body>
    </html>

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I merely meant to point out that it can be done, as it can.

    Netscape 4 may suck and blow at the same time ... but in it's day it was king. Netscape 4 can do things that still no browser since can do.

  • #8
    New Coder
    Join Date
    Aug 2002
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay since hiding form fields in N4 is not a good idea how else can I "hide" values on the page that correspond uniquely to each row that will show? Think spreadsheet effect for the form with each row requiring an identifier that is of no value to the user therefore no need to show.

    Thanks,
    Dia

  • #9
    New Coder
    Join Date
    Aug 2002
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ANother question for you....

    Both versions of netscape seem to totally ignore the following code:

    <SCRIPT LANGUAGE="VBSCRIPT">
    sub B1_onClick
    dim x, i
    x=""

    for i=0 to document.frmMetricsSelect.Metricused.length-1

    if document.frmMetricsSelect.Metricused(i).checked=true then
    x= x & document.frmMetricsSelect.metricused(i).value & ","
    end if

    next
    document.frmMetricsSelect.action="ProcessSubmitMetrics.asp?FY=" & <%=intFY%> & "&MetricsSelected=" & Mid(x,1,len(x) -1)
    End Sub
    </SCRIPT>


    I know most of you here are js people but I just have't gotten that under my belt yet. This code works fine in IE. Why does Netscape totally disregard it? The code is behind the submit button for the form.

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by brothercake
    Netscape 4 can do things that still no browser since can do.
    LOL!!
    Like crash on page enter!

    LOL!
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #11
    New Coder
    Join Date
    Aug 2002
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I was just informed by a coworker that the reason my code doesn't run is b/c netscape doesn't interpret any client-side vbs. So I ask, are any good sources out there that you can point me to that will help me learn how to turn my vbs into js for netscape?

    Thanks,
    Dia


  •  

    Posting Permissions

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