File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android 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: 63052

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

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Jsp & JavaScript
It's not a secret anymore!