Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to supply argument value in javasciript...

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, it solved the problem by putting a styleId in my form and my text field.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic