Stupid Question :D

07-31-2002, 11:53 AM

I have been asked to make a web page with a text box. No Problem. :D

Here is the Problem :(

I need to check the value of the text box and then do something based on the value. How would I go about doing this ?

Example :

Text = "Links" goto Links1.html

Thanks in advance :)

07-31-2002, 12:01 PM
If your using a scripting language, ASP, PHP, etc, then you could just use a submit button that posts your form to a "router.php" type page. Use an if statement in your router.php file to check what the value of your textbox is and redirect the user appropriately. Although i don't know why you would want to do it like that. Why not just create menu of links to your pages. :)

07-31-2002, 12:06 PM
Is any thing like this possible in HTML ?

If this were in VB the Code would look like this

If Text1.Text = "Links" then "Links.html"

this is what I am trying to do in HTML

07-31-2002, 12:21 PM
hmm ... unfortunately I don't think thats possible in just html. If your not already using a scripting language like asp or php, you could probably do it using javascript, however I don't know the syntax for that.

07-31-2002, 12:25 PM
OK no problem

07-31-2002, 05:42 PM
Yes, it can be done with client-side javascript (or vbscript if you
want to limit it to IE browsers). If you care, I can come up with
an example.

07-31-2002, 05:44 PM
Thanks Thinker :D

But I have already found a javascript example. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum