32 users online (1 members and 31 guests)  


  Results 1 to 5 of 5

Related

  1. Replies: 15
  2. get input onchange into link    Forum: CGI Perl Forum
    Replies: 2
  3. Form input link    Forum: HTML Forum
    Replies: 9
  1. #1
    cowpuck's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2002
    Posts
    2

    Question input to link to htm page

    I am trying to find a script that allows a user to enter 7 numbers into a form or input box and after they hit the keyboard key 'enter' they are taken to a htm page. The script would add the extension '.htm' to their input. Example: they enter 7575756 and hit enter, then a new frame or page opens the page 7575756.htm If the page doesn't exist, it would then go to a alternative page. Anyone have any idea's, Thank You

  2. #2
    geek987's Avatar
    Man Utd Fans

    Status
    Offline
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    156
    i know it involves either PHP or ASP, but i ain't sure. in fact, i'm not a PHP or ASP specialist anyways...u can try searching in http://www.hotscripts.com for a script like that. or maybe someone here cud help u

  3. #3
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    You can do most of it with JavaScript.

    Make a popup using the popup maker over on the left.

    Then add a second variable to the popup() function called 'page'.

    When you call the function, send the vriable 'this'. So when the form is submitted, it calls the popup function, kinda like -

    Code:
    <form method="post" onSubmit="popup(this)">
    In the new popup() function, catch the 'this' that has been sent as an object (call it obj). Then replace , in the popup function , the html page to call with the variable 'obj.textinputname.value + ".htm" '. This will have the effect of opening a page to whatever is in the textbox, plus .htm .

    I may not have made this very clear its 1am here, I have been watching Red Dwarf for th last four hours, and drinking Gin. So I am a bit dizzy..
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  4. #4
    cowpuck's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2002
    Posts
    2

    Thumbs up I'll give it a go, Thank You

    I'll give it a go and let you know, Thank You!

  5. #5
    geek987's Avatar
    Man Utd Fans

    Status
    Offline
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    156
    wups



Tags for this Thread