...

View Full Version : seach box kinda question



faheja
12-03-2006, 08:22 PM
Hey everyone.. Well first off this is what im trying to do..

I have on my web server a bunch of pages with numbers.. like for ex.

blahblah.com/1.html
blahblah.com/2.html
blahblah.com/3.html
blahblah.com/4.html

ok? and now comes to my problem. I have this blank page that i have a text box and a button that says go..

when they type in 1, or 2..

i want it to just direct it to that page...

can someone point me in the right diection on how to go with this? I can do it in flash but really dont want to. Maybe javascript? or will even html handle it?


thanks!
Edit/Delete Message

Philip M
12-03-2006, 09:31 PM
function pageChoice(which) {
var choice = which.value;
if (choice==1) {
window.location.href="blahblah1.html";
}
if (choice==2){
window.location.href="blahblah2.html";
}

////// and so on

}

<input type = "text" name = "theBox" id = "theBox" value = "" onchange = "pageChoice(this)">

faheja
12-03-2006, 11:41 PM
what if theres 500 pages?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum