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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Condition in an event for NS4

    I have a form submit that I am calling a CSS class name called ButtonA:
    Code:
    <input type="submit" name="submit" value="submit" class="ButtonA">
    It works great but dont want it on my Netscape 4 Browsers.
    How can I make the class not be available for Netscape 4?
    My attempt not working:
    Code:
    <input type="submit" name="submit" value="submit" class="if(!document.layers)ButtonA;">

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by florida
    Code:
    <input type="submit" name="submit" value="submit" class="if(!document.layers)ButtonA;">
    what even makes you think you can write JS in an non-event handler attribute? indeed this is purely a CSS issue, so how come you think it's fit for the JS forum? hmm...

    anyhow, to hide your CSS from NS4, you need to use the @import declaration to pull-in your stylesheets. they don't undestand that. that's all you need.
    *keep it simple (TM)

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks you led me to the CSS info.

    It now works with this on my page:
    Code:
    <style type="text/css" media="screen, projection"><!--
    /* style sheet info for ButtonA */ 
    --></style>


  •  

    Posting Permissions

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