Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Three unique date fields on my form
tagdrj
Junior Member

Posts: 2
Registered: 11/20/2008
Member Is Offline
posted on 11/20/2008 at 03:42 PM Reply With Quote
Three unique date fields on my form


I have three date fields on a form. But I get 'Object doesn't support this method' error when adding the third field. What am I missing?

<form>
<input type="text" name="StartDate" onFocus="this.blur();calendar1.popup()">
<input type="text" name="EndDate" onFocus="this.blur();calendar2.popup()">
<input type="text" name="FollowUpDate" onFocus="this.blur();calendar3.popup()">
</form>

<script>
var calendar1 = new calendar2(document.forms['ActivityForm'].elements['StartDate']);
var calendar2 = new calendar2(document.forms['ActivityForm'].elements['EndDate']);
var calendar3 = new calendar2(document.forms['ActivityForm'].elements['FollowUpDate']);
</script>

Thanks
View User's Profile View All Posts By User U2U Member
tagdrj
Junior Member

Posts: 2
Registered: 11/20/2008
Member Is Offline
posted on 11/20/2008 at 04:21 PM Reply With Quote

I don't know why the original code throws an error, but I figured out a solution. It works now.

<form>
<input type="text" name="StartDate" onFocus="this.blur();calendarA.popup()">
<input type="text" name="EndDate" onFocus="this.blur();calendarB.popup()">
<input type="text" name="FollowUpDate" onFocus="this.blur();calendarC.popup()">
</form>

<script>
var calendarA = new calendar2(document.forms['ActivityForm'].elements['StartDate']);
var calendarB = new calendar2(document.forms['ActivityForm'].elements['EndDate']);
var calendarC = new calendar2(document.forms['ActivityForm'].elements['FollowUpDate']);
</script>
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004