Bookmark Topic Watch Topic
  • New Topic

Form Input Box that with the right 4 digit number will display a selected page on my site  RSS feed

 
jared peterreins
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
  • Report post to moderator
where will you validate the entered code is valid will you compare from DB or any source
 
jared peterreins
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
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

 
Vijitha Kumara
Bartender
Posts: 4002
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Report post to moderator
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?
 
santosh dhulipala
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
So far i have tried to insert a form, added a input box and a submit button

When the code is entered it will open a page in my site; http://www.madison.k12.sd.us/mms/club7/RastelliRancher/default.htm

This is my first time on this site so if i need to move to the forum you suggested i will do so. Sorry and thanks for trying
 
santosh dhulipala
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Report post to moderator
i am sorry i am not clear can you be specific
 
jared peterreins
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Ok, First of all Thank you to all that have taken the time to help me out as I haven't written a line of code for 10 years.

I am going to to try and be as specific as possible with this post as to what I am trying to accomplish.

My site: http://www.madison.k12.sd.us/mms/club7/RastelliRancher/default.htm

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.

 
Paul Clapham
Sheriff
Posts: 22835
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
  • Report post to moderator
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




in servlet class(controller class)


hope i am little more clear now
please let me know if i am correct


 
Paul Clapham
Sheriff
Posts: 22835
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.

Anybody who wants to find the reposted question, it's here: http://www.coderanch.com/t/516672/HTML-JavaScript/Form-Input-Box-validate-producer
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!