Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

setting value for hidden tag

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi

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.

i.e

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

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

</script>

<%

//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......
[ February 15, 2006: Message edited by: Bear Bibeault ]
 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
kanth varad, this is the fifth topic you've posted with the title "Jsp & Javascript". This makes it impossible to tell them apart. Please read this for more information.

I've changed the title of this topic to something more approriate, please do so on your own in future posts.
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Report post to moderator
<%
String someVariable = "SomeValue";
%>

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

<script langauge="javascript">
//here i want to asign the value for the hidden input tag....
//Write whatever javascript you wish to write keeping in mind that is
//is going to execute at the client and not the server.
</script>

<%

//here i want to retreive the value into a variable....
//Not possible as you assign it in JSP which goes to client. Next the
//client will send back the value to some JSP again.
%>
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
As Niki pointed out, what you are asking to do is impossible. Please read this article for details on why.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
I've already tried to tell him twice yesterday but...
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Yes, you're right Satou. This isn't really much different a question than the one posted here, so I'm closing this topic.
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic