I am webfacing some applications which require the user to input a date,
   therefore I would like to use a popup calendar for the input versus keying
   the data in.  I have downloaded a javascript calendar called
   jscalendar(www.dynarch.com) which will do what I need but I am having a
   problem with getting everything to work in the JSP.  I am sure my issue is
   related to being very new to JSPs and web development as the calendar does
   "popup" and return the date appropriately to the input field yet my server
   reports an exception error of illegal start of statment and the app dies. 
   I have pasted the code below for my java script section, any assistance is
   greatly appreciated.

   this code is in pagebuilder.jsp to get javascript included:
   <style type="text/css">@import
   url(/weycoretail/webfacing/includes/jscalendar/calendar-win2k-1.css);</style>
   <script type="text/javascript"
   src="/weycoretail/webfacing/includes/jscalendar/calendar.js"></script>
   <script type="text/javascript"
   
src="/weycoretail/webfacing/includes/jscalendar/lang/calendar-en.js"></script>
   <script type="text/javascript"
   src="/weycoretail/webfacing/includes/jscalendar/calendar-setup.js"></script>

   this code is in my record format's jsp source:
   <TD NOWRAP rowspan=1>
   <form method="get">
       <input name="PROMPT$STRDT" <% if (isProtected) { %> readonly
   tabindex=-1 <% } %> id="PROMPT$STRDT"
   previousValue="<%=PROMPT.getFieldValueWithTransform("STRDT",
   QUOTED_TRANSFORM)%>"  <%{DisplayAttributeBean dsplAttrBean = new
   DisplayAttributeBean(); dsplAttrBean.addColourIndExpr("white","");
   dsplAttrBean.setReverseIndExpr(" 99"); %>
   class="<%=isProtected?"wf_pr":""%>
   <%=PROMPT.evaluateStyleClass(dsplAttrBean)%>" <%}%>
   VALUE="<%=PROMPT.getFieldValueWithTransform("STRDT", QUOTED_TRANSFORM)%>"
   size="10" maxlength="10" />
       <button id="trigger">...</button>
   </form>
   <script type="text/javascript" language="javascript">   
       Calendar.setup(
           {
           inputField : "PROMPT$STRDT",
           ifFormat : "%Y-%m-%d",
           button : "trigger"
           }
       );
   </script>
   </td>

   server log:
   D62/QDDSSRC/RTLDLYSLSS/html/PROMPT.jsp
   Generated servlet error:
   
/srv/www/tomcat5/wfserver/work/Catalina/localhost/weycoretail/org/apache/jsp/web
   facing/jsp/DDSrecords/RIUSRMOD62/QDDSSRC/RTLDLYSLSS/html/PROMPT_jsp.java:207:
   il
   legal start of expression
           {
           ^

   An error occurred at line: 37 in the jsp file:
   /webfacing/jsp/DDSrecords/RIUSRMO
   D62/QDDSSRC/RTLDLYSLSS/html/PROMPT.jsp
   Generated servlet error:
   
/srv/www/tomcat5/wfserver/work/Catalina/localhost/weycoretail/org/apache/jsp/web
   facing/jsp/DDSrecords/RIUSRMOD62/QDDSSRC/RTLDLYSLSS/html/PROMPT_jsp.java:212:
   ')
   ' expected
           );
            ^
   2 errors
   --

   Weyco Group -             
                             
       Florsheim, Brass Boot, Nunn Bush, Stacy Adams
   Duane Kehoe                       Phone # 414.908.1814 
   EC / Programmer / Analyst           Fax # 414.908.1610 
                             Email: dkehoe@xxxxxxxxxxxxxx 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.