Actually, it words in Firefox, but not IE. I can't get the DOM to format
right and it's probably to large to paste here. There indeed seems to be an
'includescript' with the Calendar script there, but it doesn't work. Bah!

Thanks for your help



On 5/16/07, Jesse Kuhnert < [EMAIL PROTECTED]> wrote:

Are you using FireBug on the client side?

If so it would be good to know what a sampling of the entire xml response
looks like.  There should be a block of "includescript" that includes the
necessary external js package that contains the Calendar object
definition.


On 5/15/07, William Keller < [EMAIL PROTECTED]> wrote:
>
> Hi all,
>    I'm trying to build a page which has a few basic components, and a
few
> EventListeners that update 'select' components etc etc. Recently, I've
> been
> trying to add a @DatePicker, but I get horrible errors. Stack trace is
> attached:
>
> ERROR: 11:51:47 PM: Error evaluating script: //<![CDATA[
> calendar_warrantyStartDate = new Calendar();
> calendar_warrantyStartDate.initialize(["January", "February", "March",
> "April", "May", "June", "July", "August", "September", "October",
> "November", "December"], ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul",
> "Aug", "Sep", "Oct", "Nov", "Dec"], ["Sunday", "Monday", "Tuesday",
> "Wednesday", "Thursday", "Friday", "Saturday"], ["Sun", "Mon", "Tue",
> "Wed",
> "Thu", "Fri", "Sat"], "dd MMM yyyy", 0, false, 1,
> "Clear");calendar_warrantyStartDate.onchange = function() { var field =
> dojo.byId("form").warrantyStartDate; var value =
> calendar_warrantyStartDate.formatDate(); if (field.value != value) {
> field.value = value; if (field.onchange) field.onchange(); }}
dojo.require
> ("
> tapestry.form");tapestry.form.focusField('productType');
> tapestry.cleanConnect(dojo.byId ("productType"), "onchange",
> "formEvent153267511"); tapestry.formEvent153267511=function(e){ var
> content={beventname:"onchange"}; tapestry.event.buildEventProperties (e,
> content); if (!content["beventtarget.id"]){
> content["beventtarget.id"]="productType";
> } var validateState= tapestry.form.forms["form"].validateForm; var
> validateForm=false; tapestry.form.setFormValidating("form",
validateForm);
> tapestry.form.submitAsync("form", content);
> tapestry.form.setFormValidating ("form",
> validateState); }; dojo.event.connect(dojo.byId("productType"),
> "onchange",
> tapestry, "formEvent153267511"); tapestry.cleanConnect(dojo.byId
> ("policyType"),
> "onchange", "formEvent1649734528");
tapestry.formEvent1649734528=function
> (e){
> var content={beventname:"onchange"}; tapestry.event.buildEventProperties
> (e,
> content); if (!content["beventtarget.id"]){
> content["beventtarget.id"]="policyType";
> } var validateState= tapestry.form.forms["form"].validateForm; var
> validateForm=false; tapestry.form.setFormValidating("form",
validateForm);
> tapestry.form.submitAsync("form", content);
> tapestry.form.setFormValidating ("form",
> validateState); }; dojo.event.connect(dojo.byId("policyType"),
"onchange",
> tapestry, "formEvent1649734528"); //]]> TypeError : 'Calendar' is
> undefined
>
>
>
> The Code I'm using is
>
>                     <div class="fieldItem">
>                         <span jwcid="@FieldLabel"
>                             class="fieldLabels formFieldLabels"
>                             displayName="Start Date"
>                             field="component:warrantyStartDate"
>                         />
>                         <span jwcid=" [EMAIL PROTECTED]"
> value="ognl:policy.warrantyStartDate" class="field medField"/><br/>
>
> Could the error I'm having stem from the fact that this calendar is
inside
> an 'IF' block, that is rendered based on a particular EventListener
event?
>
> Any help would be great, or I'll just have to revert to plain text
fields
>
> Cheers
>



--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to