SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast athena's Avatar
    Join Date
    Apr 2002
    Location
    Vancouver, Canada
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Javascript / CSS

    I'm trying to create an if-statement in Javascript that would look something like this:

    if ( "browser has style sheets are turned on" ) {
    ... execute code ...
    }


    however I'm fairly new to Javascript and I'm not sure what the "browser has style sheets are turned on" bit should look like.

    Some help from the resident script wizards would be much appreciated.

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    afaik there's no way to detect this. Why would you need to?
    ::: certified wild guess :::

  3. #3
    SitePoint Enthusiast athena's Avatar
    Join Date
    Apr 2002
    Location
    Vancouver, Canada
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adios
    afaik there's no way to detect this. Why would you need to?
    I'm designing a website for a disability lifestyle magazine and one element of the contract is to make the site as universally accessible to all browser types (including speech browsers, etc.) as possible. The site (still in the template stages) uses CSS to layout the design but one of things I needed to do to satisfying the client's desire for a three-column layout is use Javascript to equalize the lengths of the columns.

    The whole thing works as it should with CSS turned on and the speech browser I've been using to test with, IBM HomePage Reader, seems to read the page as it should... however one of the requirements of "truly accessible design" is that the site is still comprehensible with style sheets turned off... and because of the Javascript messing with the columns, the whole thing look pretty confused with the stylesheets off.

    I figured if I could just shut off the Javascript in those instances, then everything would be peachy.

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    athena...

    If a mod doesn't do it, delete this post & move it here.

    Might get a better answer.
    ::: certified wild guess :::


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
  •