Simple HTML/Javascript Forms help

Discussion in 'HTML & Website Design' started by tbh, Aug 8, 2007.

  1. #1
    I need to know how to make a "test question" input box. For example, on the index there will be a textbox and a submit button. You need to type in a certain word to go to the next page (when you press submit). If you type in the wrong word an error will come up or something like that. (The error is not important).

    This is kind of like a password but not in a password box.

    I would also like it encrypted so that no one can see what the secret word is by just looking at the source.

    Please help/explain or link me to a site that does
     
    tbh, Aug 8, 2007 IP
  2. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think this is not possible with HTML where you need to use some condition checking like this. You need to use scripting like ASP or PHP.
     
    saurabhj, Aug 8, 2007 IP
  3. tbh

    tbh Peon

    Messages:
    1,130
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you know somewhere were I can get a tutorial on how to do it? I have my own server and a couple PHP sites but I've never programmed them myself.
     
    tbh, Aug 8, 2007 IP
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What server-side programming language would you want to use?

    Also, a plain text input may be the best way to go about this actually, but make sure that the question is unique with each page load or refresh. You'd probably have to have an open connection to the server to pull this off, which would require the use of Ajax (I mean the use of "Asynchrinous JavaScript and XML" here, not the cleaning product).

    I strongly suggest you PM deathshadow - he'll be able to point you in the right direction.
     
    Dan Schulz, Aug 8, 2007 IP
  5. tbh

    tbh Peon

    Messages:
    1,130
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #5
    tbh, Aug 9, 2007 IP
  6. sagargemini

    sagargemini Peon

    Messages:
    625
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can achieve this by using scripting a language. Through your script, connect to a SQL database (where you will strore the words or questions). Through the script, crawl through your table to check if what the user has entered matched with data in table. In this way, you will achieve what you want without compromising on security!
     
    sagargemini, Aug 12, 2007 IP