This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts and javaScripts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and javaScripts" Watch "Struts and javaScripts" New topic

Struts and javaScripts

sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
Hi experts...

how to get value of a form element on a struts page...inside java script.

for example..
<html:text property="loginName" />

how to get the value of login name that a user javaScript

document.loginName.value works??? or is there some other way to do it..
pls help
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
You could use,


sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
Hi pranav

i tried formName.loginname.value as you said but thats not working..

thanks for your quick reply
I agree. Here's the link:
subject: Struts and javaScripts
It's not a secret anymore!