hi matt

have you a link to your jsp/javascript calender?

i've got some time off for a few days.

I've worked on quite a few off these sorts of things in my time and I could be a useful person to have on board.

let me know

cheers mark

On Wednesday, May 28, 2003, at 20:02 Europe/London, Kruse, Matt wrote:

I have to believe someone out there has done something
similar and is as
little expert in mixing javascript and struts as I am.

As soon as I get extra time, I _will_ be putting this calendar into a struts
taglib, so no one will need to fight this anymore :)


I'll point out a couple of issues and hope that they will help you along:

document.forms[0].elements['targetDate'].value = m + "-" + d + "-" + y;
<input type="text" name="eventList[0].targetDate" value="05-31-2003">

'targetDate' is not the name of your field. 'eventList[0].targetDate' is.


Technically, this is an invalid name for an input field, but we'll ignore
that fact because it's now become more common with PHP and Struts and who
knows what else creating this type of field name.


To reference an invalid form field name like this, you will need to use a
reference like this:


document.forms[0]['eventList[0].targetDate']

But, since you're using the 'select' method, you don't even need to define
the setReturnFunction or anything. Just use select() and pass it the form
field to populate and format.


So, I think what you really want is:

<a HREF="#"

onClick="cal1.select(document.forms[0]['eventList[0].targetDate'],'anch or1',
'MM/dd/yyyy'); return false;"
NAME="anchor1" ID="anchor1">


Try that and see if it works :)

Matt Kruse


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to