#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    29
    Rep Power
    0

    Using Java to detect frames


    is there any way of using Java to dectect if a person is using frames set up or a non frame set up?
  2. #2
  3. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14
    here is how you could do it in javascript:

    <script language="JavaScript"><!--
    if (frames.length > 0)
    alert('We have frames');
    else
    alert('We have no frames')
    //--></script>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    29
    Rep Power
    0
    Ok here is another question, is there any way of having a variaible called usesframes = yes if they r using frames or usesframes = no if they r not so that I can use another script langague to decided what to do on depending on what the user is using.
  6. #4
  7. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14
    ya, just say

    variablename = "yes"
    or
    variablename = "no"

    then you could have some redirect or something to your script if the variable it equal to a certain value

IMN logo majestic logo threadwatch logo seochat tools logo