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

    Join Date
    Aug 2001
    Posts
    229
    Rep Power
    14

    PLEASE HELP! javascript question


    I have a link to a popup window on a site I'm developing - it's a legal disclaimer that the user needs to agree to before entering the next page... The code I'm using I pasted below. My question is, if the user has javascript turned OFF, what do I do? They still need to access that page and agree to the legal details. Making the popup into just a regular web page that you click to is the only solution I know of, but I'd really like to keep the disclaimer as a popup window. HELP!!!

    Thanks in advance.
    Carrie

    link to popup:

    <a href="javascriptpenAWindow('popups/mf_inlink.htm','newWin',300,170,1)">

    javascript code:

    function openAWindow( pageToLoad, winName, width, height, center) {
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
    xposition = (screen.width - width) / 2;
    yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + ","
    + "height=" + height + ","
    + "location=0,"
    + "menubar=0,"
    + "resizable=1,"
    + "scrollbars=0,"
    + "status=0,"
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + "," //NN Only
    + "screeny=" + yposition + "," //NN Only
    + "left=" + xposition + "," //IE Only
    + "top=" + yposition; //IE Only

    window.open( pageToLoad,winName,args );
    }
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Use the <noscript> tags to display what you want if javascript is disabled.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Posts
    229
    Rep Power
    14

    details please?!


    Thanks. I still don't really understand what I can do though...
    Can you give me an example?

    The users will still need to agree to the legal terms. Are you saying I should use <noscript> to just link them to a regular web page rather than a popup? If that's the case, I might as well just have everyone link to the regular page and forget the popup altogeter. However, there are popups all over the site, so this could create a LOT of extra work for those few people who have JS turned off. Is there are way to still have a popup come up?

    Thanks for your help!
  6. #4
  7. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    I don't know of a way to open a "pop-up" page without using some form of scripting language.
    If the user has this option turned off, then you must have alternative means for the user to get to this page to agree with it.
    i.e.
    Code:
    <script language="javascript">
        window.open('your_pop_up_page.html', etc, etc);
    </script>
    <noscript>
        <a href="your_pop_up_page.html" target="_new">Please read the agreement before you proceed any further!</a>
    </noscript>
    Now, how much work it will entail making your entire site like this? That depends on you. You can always just make a disclaimer on your index page that says that this site requires users have javascript turned on. Or, you could go through and make sure your site works accordingly no matter how the user's browser is configured.
    You can always make the user go from your main page to the legal terms page and only let them past that page if they agree.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Posts
    229
    Rep Power
    14

    thanks


    excellent advice. thank you!

    now, I'm going to run those options by the client to see what they prefer to do.

IMN logo majestic logo threadwatch logo seochat tools logo