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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    seach box kinda question

    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

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    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)">

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what if theres 500 pages?


  •  

    Posting Permissions

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