/    Sign up×
Community /Pin to ProfileBookmark

.:~Number changes link~:.

is there any resourses anyone can give mefor me to make a script like this:

[QUOTE]

<FORM METHOD=POST ACTION=””>
<INPUT TYPE=”text” NAME=”Number”>
<INPUT TYPE=”submit”>
</FORM>

[/QUOTE]

so when they type in a specific number or range of numbers eg.1-5 they are taken to a page depending on what number they put in.
or even what word you type in?

any help will be gratefull

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@thambaAug 01.2007 — Heres a sample of what you need. Try this and let me know:

<html>

<head>

<script type="text/javascript" language="JavaScript">

function sendtopage(num){

var form = document.myForm;

if(num == '1'){

form.action = "http://www.google.com/";

}else if(num == '2'){

form.action = "http://www.yahoo.com/";

}else if(num == '3'){

form.action = "http://www.ebay.com/";

}

}

</script>

</head>

<body>

<form name="myForm" method="post" action="" onSubmit="sendtopage(this.number.value);">

<input type="text" name="number">

<input type="submit">

</form>

</body>

</html>
Copy linkTweet thisAlerts:
@mitchellauthorAug 01.2007 — thamba , all i can say is , thank you so much, i grately appreciate it.

thanks a lot
×

Success!

Help @mitchell spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...