/    Sign up×
Community /Pin to ProfileBookmark

calendar popup java script error

Hi,

I have a javascript error when I try to open a calendar popup. I am not sure why it stopped working. It was working fine earlier. Here is the code. I appreciate your help.

[code=html]<input type=”text” clas=”text” name=”requestedStartDate” size=”15″ maxlength=”10″ id=”requestedStartDate” />
&nbsp;
<script type=”text/javascript”>
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 91);
var reqStartDateCal = new CalendarPopup(“reqStartDateDiv”);
reqStartDateCal.addDisabledDates(“<alldata:data name=”pageStartDate” />”,formatDate(futureDate,”yyyy-MM-dd”));
reqStartDateCal.setDisabledWeekDays(0,6);
</script>
<DIV ID=”reqStartDateDiv” STYLE=”position:absolute;visibility:hidden;background-color:white;layer-background-color:white;”></DIV>
<A HREF=”#” onClick=”reqStartDateCal.select(document.forms[0].requestedStartDate,’anchor1x’,’MM/dd/yyyy’, ”); return false;” NAME=”anchor1x” ID=”anchor1x”>
<img src=”<%=calendarImg%>” border=”0″/>[/code]

The error that I get is :
Line: 1174
Char: 2
Error: ‘type’ is null or not an object.

I appreciate your help.

Thanks,
Prasav.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJun 05.2008 — Try escaping:reqStartDateCal.addDisabledDates("&lt;alldata:data name=[B][COLOR="DarkGreen"][/COLOR][/B]"pageStartDate[B][COLOR="DarkGreen"][/COLOR][/B]" [B][COLOR="DarkGreen"][/COLOR][/B]/&gt;",formatDate(futureDate,"yyyy-MM-dd"));
Copy linkTweet thisAlerts:
@prasavauthorJun 05.2008 — Hi Fang,

it did not help.

Thanks,

Prasav.
×

Success!

Help @prasav spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...