aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 61066

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