Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
Consider Paul's rocket mass heater.
subject: Struts and javaScripts
Similar Threads
get value from propertie file?
Struts Select Tag
regarding session
how to get selected value from s:select tag in struts 2
Struts Select Tag