aspose file tools
The moose likes Beginning Java and the fly likes Form Input Box that with the right 4 digit number will display a selected page on my site Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

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

Joined: Mar 24, 2008
Posts: 3670

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?

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
santosh dhulipala
Ranch Hand

Joined: Oct 21, 2010
Posts: 52
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
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

Joined: Oct 21, 2010
Posts: 52
i am sorry i am not clear can you be specific
jared peterreins
Greenhorn

Joined: Nov 09, 2010
Posts: 6
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
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

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
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
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Form Input Box that with the right 4 digit number will display a selected page on my site
 
Similar Threads
how to drag and drop from Select List Box to Text input box?
Getting the value of a input box in an applet?
Referncing variables
Send Japanese Characters from JSP to Servlet
minor help needed