File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to supply  argument value in javasciript... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to supply  argument value in javasciript..." Watch "How to supply  argument value in javasciript..." New topic
Author

How to supply argument value in javasciript...

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
With my form beans producing text field names such as

personalInfo.dateOfBirth

how am I suppose to put this as an argument to javascript? In my href tag, my javscript looks like this...


<a href="javascript:show_calendar('myform.textfield',null,'','yyyy/mm/dd');">

but because the text field name produced by Struts is so vague, I think javscript is a little confused... How am I suppose to supply the value for the first argument above if I have a form named applicantFormBean and a textfield named personalInfo.dateOfBirth? Thanks...
[ June 06, 2006: Message edited by: Timothy Sam ]

SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I believe that you want to use the styleId property which renders an id property in the html. Use the value of the styleId property in your javascript.

- Brent
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Thank you, it solved the problem by putting a styleId in my form and my text field.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to supply argument value in javasciript...