This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Accessing form members... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Accessing form members..." Watch "Accessing form members..." New topic
Author

Accessing form members...

Tom Diamond
Ranch Hand

Joined: May 10, 2001
Posts: 98
Hello,
Is there a way to access a form member (textfield, textArea, and so on) in a JSP page?
I mean is there an equivalent to javascript's

What I actually want to do is to take the text from a textField and pass it as a parameter to another jsp with the click of a custom button (not the default <input type=submit> ) :

Tom.

[This message has been edited by Tom Diamond (edited October 15, 2001).]
Karen Berx
Greenhorn

Joined: Oct 15, 2001
Posts: 3
I don't think you can do it in JSP only.
You can do a get on your current JSP page. Then you can receive the parametervalues of your form-fields.
Or use javascript in your JSP-pages. I do that.
Greetz
Karen
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

well remember that JSP is server side, so your <%= %> tags won't have anything in them, because the client side has to fill them in first.

what about simply calling javascript inline? I'm not too good at javascript, but I remember having to do something very similar to this.. tomorrow at work I'll look it up and post, if my memory isn't totally shot.
Tom Diamond
Ranch Hand

Joined: May 10, 2001
Posts: 98
Thanx.
I 've tried Javascript and it works just fine but if anyone knows something more I would like to know...
Tom.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Accessing form members...
 
Similar Threads
getting the URL for the calling jsp page?
passing jsp variable to java script function on same page
JSP and Javascript problem
simple question
encode namsepace in portlets