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 JSP and the fly likes Jsp & JavaScript 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 » JSP
Reply locked New topic

Jsp & JavaScript

kanth varada

Joined: Feb 14, 2006
Posts: 14

I want to set the value for the html hidden tag through Java Script and i want to use that hidden tag value in a jsp page.


<input type=hidden value=" " name="hid">

<script langauge="javascript">
//here i want to asign the value for the hidden input tag....



//here i want to retreive the value into a variable....


Pls send me the Stuff how can i do that.....
Pls send me a small example......
Shilpa Asuthkar

Joined: Dec 22, 2005
Posts: 10
hope this will help u.....

<script language="javascript">
function meth()

<form name="myform" action="temp1.jsp" onSubmit="return meth()">
<input type="hidden" name="t1" value='<%=request.getParameter("t1") %>' >
<input type="submit" value="submit" >

<% String str=null;
<%= str%>

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60785

Please continue any discussion on your previous post on this same topic.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Jsp & JavaScript
Similar Threads
Self Submit Form
one submit button two action
Checking if browser supports JAVASCRIPT and COOKIES...
Setting a hidden feild
setting value for hidden tag