SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard rctneil's Avatar
    Join Date
    Jun 2005
    Posts
    1,898
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Lookig for a script

    Hello,
    I ahve seen a script somewhere that you can insert into a page and it allows a person to access a site and just type a word whcih will redirect them somewhere else. It doesn't look like they are typing anything though.

    Can anyone help me find this?

    Thanks

    Neil

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    That technique doesn't appear to make much sense.
    Please provide a link to where you have seen this technique.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Wizard rctneil's Avatar
    Join Date
    Jun 2005
    Posts
    1,898
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats why I am aksing here as I have forgotten I ahve even used it myself. It's basically a way to give people access to another page or even a link without other people knowing it's there. All the user has to do is type the word and if it's typed correctly they will be redirected.

  4. #4
    SitePoint Wizard rctneil's Avatar
    Join Date
    Jun 2005
    Posts
    1,898
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    That could be something like what google reader does. I'll use "gm" here for "go to mail" as an example.

    Code javascript:
    function captureKey(e) {
        e = e || window.event;
        var keyCode = e.charCode || e.keyCode;
        var key = String.fromCharCode(keyCode);
        window.keys += key;
     
        if (window.keys === 'gm') { // go mail
            location.href = 'mail.html';
        }
        if (window.keyTimer) {
            clearTimeout(window.keyTimer);
        }
        window.keyTimer = setTimeout(clearKeys, 2000);
    }
    function clearKeys() {
        window.keys = '';
    }
    window.onkeypress = captureKey;
    clearKeys();
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •