This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes html:hidden, property & javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "html:hidden, property & javascript" Watch "html:hidden, property & javascript" New topic
Author

html:hidden, property & javascript

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1493
i want to assign a value to property of a bean. The value is actually in a javascript variable....

function submitId(somevalue)
{
document.getElementById("set_me").value=somevalue;
document.forms[0].submit();

}



<html:form action="TaskDetails">
<input type="hidden" id="set_me" value="10" />
</html:form>


trouble is

<input type do not have "property" tag and if I use
html:hidden there is no way to get the script variable....


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 437
how about styleId ?
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1493
Thanks for responding buddy..... i did something of this kind...

http://husted.com/struts/tips/002.html
and hopefully it worked...
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I am not sure how the linked article fits in with your issue. Did you give styleId a try? The Struts html tags have a property named styleId that renders the html id attribute which is what you would need to use with document.getElementById.

- Brent
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: html:hidden, property & javascript
 
Similar Threads
Re: using javascript in jsp's
html:form pointing to some outside url ?
bean value persists on clicking back
Struts wizard + JavaScript validation
struts taglib problem!