I downloaded a calendar.asp file that someone named Jacob "WickedPiss er"
Gilley made. It's a few years old but It works fine and it's what I was
looking for without getting into ActiveX objects. But I am having
trouble with something that I beleive it's because of my lack of
JavaScript knowledge.
In the initilizing code, he has:
' Add event code for when a day is clicked on. Notice
' that when run inside your browser, "$date" is replaced
' by the date you click on.
MyCalendar.OnDa yClick = "javascript:ale rt('You clicked on this date:
$date')"
So when I run the page, when I click on a day I get an alert box saying
'You clicked on this date: 3/26/2004', but with the date being the day
that I clicked on. So I wanted to change the javascript to set the
field for the day I clicked on, so I tried several things:
MyCalendar.OnDa yClick =
"javascript:doc ument.frmAddVis itCal.AP_DATE.v alue = $date"
MyCalendar.OnDa yClick =
"javascript:doc ument.frmAddVis itCal[AP_DATE].value = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.document.fr mAddVisitCal.AP _DATE.value = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.document.fr mAddVisitCal[AP_DATE].value = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.opener.docu ment.frmAddVisi tCal.AP_DATE.va lue = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.opener.docu ment.frmAddVisi tCal[AP_DATE].value =
$date"
But none of them worked, I get 'Is Null or NOt an object'
So why can't I reference my field object? the form is correct and the
field name is correct.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Gilley made. It's a few years old but It works fine and it's what I was
looking for without getting into ActiveX objects. But I am having
trouble with something that I beleive it's because of my lack of
JavaScript knowledge.
In the initilizing code, he has:
' Add event code for when a day is clicked on. Notice
' that when run inside your browser, "$date" is replaced
' by the date you click on.
MyCalendar.OnDa yClick = "javascript:ale rt('You clicked on this date:
$date')"
So when I run the page, when I click on a day I get an alert box saying
'You clicked on this date: 3/26/2004', but with the date being the day
that I clicked on. So I wanted to change the javascript to set the
field for the day I clicked on, so I tried several things:
MyCalendar.OnDa yClick =
"javascript:doc ument.frmAddVis itCal.AP_DATE.v alue = $date"
MyCalendar.OnDa yClick =
"javascript:doc ument.frmAddVis itCal[AP_DATE].value = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.document.fr mAddVisitCal.AP _DATE.value = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.document.fr mAddVisitCal[AP_DATE].value = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.opener.docu ment.frmAddVisi tCal.AP_DATE.va lue = $date"
MyCalendar.OnDa yClick =
"javascript:win dow.opener.docu ment.frmAddVisi tCal[AP_DATE].value =
$date"
But none of them worked, I get 'Is Null or NOt an object'
So why can't I reference my field object? the form is correct and the
field name is correct.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment