...

View Full Version : URL Jump Boxes



webdesign_123
08-25-2002, 01:13 PM
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:


<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 :)

menhir
08-25-2002, 02:51 PM
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
}

smeagol
08-25-2002, 02:56 PM
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

webdesign_123
08-25-2002, 03:15 PM
:thumbsup: :) Thank you both very much :) :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum