Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

DatePicker with struts

  • 27-05-2005 10:32AM
    #1
    Closed Accounts Posts: 73 ✭✭


    Trying to implement a datepicker in struts.I down loaded the date picker off the net and tried to implement it in my jsp. It works fine ouside the struts form tags but inside nothing happens and i get an "error on page" message. Thanks in advance.

    (Code)
    <html>
    <head>
    <title></title>
    <SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript">
    var cal = new CalendarPopup();
    </SCRIPT>
    </head>
    <body bgcolor="#FFFFFF">
    <html:form action="projectadd">
    <table>
    <tr>
    <td>
    Date
    </td>
    <td>
    <html:text property="date1" size="30" maxlength="60"/>
    <A HREF="#"
    onClick="cal.select(document.forms.date1,'anchor1','MM/dd/yyyy'); return false;"
    NAME="anchor1" ID="anchor1">select</A>
    </td>
    </tr>
    </table>
    </html:form>
    <FORM NAME="example">
    <br>
    <INPUT TYPE="text" NAME="date1" VALUE="" SIZE=25>
    <A HREF="#"
    onClick="cal.select(document.forms.date1,'anchor1','MM/dd/yyyy'); return false;"
    NAME="anchor1" ID="anchor1">select</A>
    </FORM>


    </body>
    </html>


Comments

  • Closed Accounts Posts: 133 ✭✭Jim Kernsey


    use the styleid tag like so

    where you have

    <html:text property="date1" size="30" maxlength="60"/>

    change it to

    <html:text property="date1" size="30" maxlength="60" styleId="date1"/>

    I'm assuming date1 is the name of the calander.


    JK


Advertisement