Form Input Box that with the right 4 digit number will display a selected page on my site
jared peterreins
Greenhorn
Joined: Nov 09, 2010
Posts: 6
posted
0
I want to create an input box that when the user enters a code that matches a producer it will bring up that producers page??? any help
santosh dhulipala
Ranch Hand
Joined: Oct 21, 2010
Posts: 52
posted
0
where will you validate the entered code is valid will you compare from DB or any source
Thanks & Regards
Santosh Kumar.D
jared peterreins
Greenhorn
Joined: Nov 09, 2010
Posts: 6
posted
0
any source i guess? the codes will be genaric Rancher 1 = 1234
Rancher 1 has his own page on my website but will only be displayed if the user enters the right code is it possible
Welcome to JavaRanch, Jared . This post would sit better in our HTML/JSP forum as this is related to web. Next time please CarefullyChooseOneForum.
Rancher 1 has his own page on my website but will only be displayed if the user enters the right code...
Please, TellTheDetails, how you suppose to display the page i.e: within the same page as the input box or... And how you have approached the issue so far?
ok but will you validate wether it exist or not
we can do it in this way
get the vale from the text box,get the substring value declare is as a string and append page extention to it in the controller class redirect by passing the string value(the appended) which will forword to the page you want
here you have to validate wether the file is there or not
hope i am clear
jared peterreins
Greenhorn
Joined: Nov 09, 2010
Posts: 6
posted
0
So far i have tried to insert a form, added a input box and a submit button
the site is a project site that allows consumers to track their beef that they bought back to the rancher up to 6 different ranchers. The ground beef would have a producer code on it. example code 123456, 654321, 213456, 456123, 543216, 321456.
If the consumer enters the correct producer code it will bring up that ranchers bio page that i have created on my site. If a user enters an invalid code it will go to a different page stating "invalid producer code" or it could be an error message.
I hope that is clear, because it is as clear as i can make it. Thanks for all your help.
Okay, this is starting to sound like a question about a web application now. But I can't choose a suitable forum to move it to without knowing what the question is about.
So what is the question? Are you asking how to make an input box in HTML? Or are you asking what to do with the user's input on the server? If that's the case, what kind of software are you running on the server? Do you have anything which can process this input? Do you have a database set up for these ranchers or is that also something you're asking about? You think your question is clear but it really isn't.
santosh dhulipala
Ranch Hand
Joined: Oct 21, 2010
Posts: 52
posted
0
we can do it in this way
get the value from the text box,get the substring value declare is as a string and append page extention to it in the controller class redirect by passing the string value(the appended) which will forword to the page you want
Okay... you've reposted the question in the HTML/Javascript and Eric seems to agree that it's a Javascript question. And he should know. So I will close this copy of the question.