[Javascript] text value --> page
Rodney Myers
rodney.myers at btinternet.com
Fri Jun 1 17:46:10 CDT 2001
"patricia !" wrote:
> why do i keep getting other people's email? i was trying to get a js
> dilemma solved, but have apparently put myself on some kind of weird mailing
> list that enables me to get everyone else's mail?.....!
Not "weird", a group. On a mailing list you get the list's mail. Welcome to the
list.
>
>
> all i want to know is how to put more than one possible value on a text
> field, and depending on the value, the script should go to a corresponding
> page. i am trying to build a simulation of a billing program for an on-line
> learning system.
>
to get the value from the input you ned the value property of the input
var form = window.document.MyForm; // FORM object
var txt = form.MyInput.value; // Value of text input
Then you need to set up your conditions - unless the text value is actually a
filename - which seems unlikely.
e.g. Test for the text containg A or a
if( txt.toUpperCase().indexOf("A")>-1)
{
window.location = "page1.htm"; // send browser to page1.htm - a file in same
folder
}
Then you can have more conditions and pages
hth
Rodney
BTW the link below is where to go to manage your membership of this list.
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
--
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/
Enquiries regarding Shop at ssistant Classic training :
Call 01256 880770
Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010601/be1386f0/attachment.htm>
More information about the Javascript
mailing list