Advertise Here

Author Topic: [Code] Website Jump Box  (Read 3640 times)

0 Members and 1 Guest are viewing this topic.

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
[Code] Website Jump Box
« on: February 01, 2009, 10:22:57 am »
This has probably already been given, if it has then here is is again, if not then here is it ;D:

Use this script to allow your visitor to go to a another website by typing it inside a box, and either pressing enter or the button. They will then be redirected to that site ;).

Why use a form box when there is a default location box on the top of your browser?
- Well, it's more interesting this way.

Live Preview

Add this to your header or footers:

Code: [Select]
<form name="jumpurl1" onSubmit="return jumpit()">
<input type="text" size=30 name="jumpurl2" value="http://">
<input type="button" value="BUTTON TEXT" onClick="jumpit()">
</form>
<script>

//Code posted by Lawrence. NOT made by him.


function jumpit(){
window.location=document.jumpurl1.jumpurl2.value
return false
}
</script>

If you want to change the button text just change this bit of the code, out of here:
Code: [Select]
<input type="button" value="BUTTON TEXT" onClick="jumpit()">
« Last Edit: June 03, 2009, 11:55:02 am by - Lawrence - »

Offline Andrew

  • Helpers
  • *
  • Posts: 2060
  • Andrew at your service
    • View Profile
    • Alabama Weather Prediction

  • Total Badges: 32
    Badges: (View All)
    10 Poll Votes Level 6 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: [Code] Website Jumb Box
« Reply #1 on: February 01, 2009, 10:26:05 am »
Great code! Just added it to my test site!

Just one little thing-made a typo in the title ;)

You're on a code-making spree arent ya?

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Website Jumb Box
« Reply #2 on: February 01, 2009, 10:30:43 am »
...

Just one little thing-made a typo in the title ;)

You're on a code-making spree arent ya?
No one noticed it, lol ;D. Thanks

And I have had some spare time recently. ;) I have a count down timer to come next. Just adjusting a few things on it.
« Last Edit: February 01, 2009, 11:13:53 am by - Lawrence - »

Offline magaki13

  • SMF For Free Member
  • *
  • Posts: 23
    • View Profile

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Website Jump Box
« Reply #3 on: February 02, 2009, 02:49:31 pm »
Great code m8!
Thanks!

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1117 Views
Last post September 25, 2007, 03:33:27 pm
by Crasy
5 Replies
1203 Views
Last post January 12, 2008, 01:59:40 pm
by LaundryLady
1 Replies
1293 Views
Last post August 18, 2008, 03:46:34 pm
by simply sibyl
30 Replies
6161 Views
Last post November 30, 2008, 11:16:07 pm
by simply sibyl
4 Replies
2190 Views
Last post November 13, 2009, 09:16:37 pm
by Coder4ever