Stupid Question :D

chris00
07-31-2002, 12:53 PM
Hi

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 :)

Cogen
07-31-2002, 01: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. :)

chris00
07-31-2002, 01: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

Cogen
07-31-2002, 01: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.

chris00
07-31-2002, 01:25 PM
OK no problem

Thinker
07-31-2002, 06: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.

chris00
07-31-2002, 06:44 PM
Thanks Thinker :D

But I have already found a javascript example. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum