Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Javascript Calendar problem  RSS feed

Darryl Nortje
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I was given a javascript calendar that is able to insert the user selected date into a field on a jsp page. The problem that I have is that that is in a static environment. ie: the parameter name is coded in the javascript calendar .js file. What I need to do is this. According to records on a database I am build up a page that looks similar to this -->
Attibute Value
First Name [_________] <-- text box
Surname [_________]
Now when the attribute is a Date, I want to make the Value textbox readonly, and to put a link next the the value text box, that opens up a javascript calendar and the user selected date must be inserted in the correct text box. The problem that I am having is that I can't find anyway of of passing the name of the field in to the js calendar, and it then succesfully using it to set the date. Does anyone have any ideas how I can get around this problem.
Also to mention again, that page is dynamic, It grows depending on records in a database. Here is the jsp code snippet that builds the table. I am using struts...........
<logic:iterate name="attrib" id="collElem">
<td width="472">
<bean:write name="collElem" property="value"/></td>
<td width="398">
<input name="<bean:write name="collElem" property="key"/>" <bean:write name="collElem" property="read"/>/>
<logic:equal name="collElem" property="read" value="readonly">
<a href="javascript:show_calendar('<bean:write name="collElem" property="key"/>');">...'<bean:write name="collElem" property="key"/>.value'</a>
Any ideas please...........
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!