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 4 of 4

Thread: URL Jump Boxes

  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy URL Jump Boxes

    For my web site, I have a password reminder section where the user enters the first part of his/her email address, then it directs them to a page designed for them (the address being the first part of their email address) with a secret question/answer form. Can I edit the script below, so that the form automatically adds .html to the end of the email address?

    This is the script I use:
    Code:
    <form name="jumpurl1" onSubmit="return jumpit()">
    <input type="text" size=30 name="jumpurl2" value="">
    <input type="button" value="Go!" onClick="jumpit()">
    </form>
    
    <script>
    
    /*
    URL jump box
    By Javascript Kit
    */
    
    function jumpit(){
    window.location=document.jumpurl1.jumpurl2.value
    return false
    }
    </script>
    Thanks for any help

  • #2
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello!

    You just have to add + '.html' as shown below. I hope this will work for you.

    Johan

    function jumpit(){
    window.location=document.jumpurl1.jumpurl2.value + '.html'
    return false
    }

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kentucky
    Posts
    133
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello,

    Just thought I'd put my two cents in. Here's what I did:

    <form name="jumpurl1" onSubmit="return jumpit()">
    <input type="text" size=30 name="jumpurl2" value="">
    <input type="button" value="Go!" onClick="jumpit()">
    </form>

    <script>

    /*
    URL jump box
    By Javascript Kit
    */

    function jumpit(){
    var strlink = new String;
    strlink = document.jumpurl1.jumpurl2.value + '.html';
    window.location= strlink;
    return false
    }
    </script>

    Smeagol
    http://www.javascriptsolutions.com

  • #4
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you both very much


  •  

    Posting Permissions

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