aspose file tools*
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
Author

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 entered...in 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,
window.forms[0].loginName.value

or

window.formName.loginName.value
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: http://aspose.com/file-tools
 
subject: Struts and javaScripts