Solved

Help with DateTimePicker

Posted on 2007-03-29
14
500 Views
Last Modified: 2011-09-20
Hi,
I want to have a Date Picker in an HTML page, for an "intranet" application, not served by a web server, but it just runs the code on the htm page.
I'm trying this in the form:
<object classid="java:com.ms.wfc.ui.DateTimePicker" id="DateTimePicker" align="middle" height="30" width="300"> </object>
but when running the page with internet explorer 6 or more, I just get a small square with a red X inside.

What am I doing wrong? How do I have to set the browser options, security zones, etc?

Thanks!

P.D. I'm using Expression Web to edit it and it appears to be an active-x control.
0
Comment
Question by:drotkopf
14 Comments
 

Expert Comment

by:smoothcat11
ID: 18819550
0
 

Author Comment

by:drotkopf
ID: 18821143
I'm doing this now...

<td height="50" align="right" style="width: 368px">
<form><br><script>DateInput('callbackdate', true)</script></form>
</td>

And then, when a certain button is pressed, a javascript function is called and I want to get the date value. How do I do that? It's telling me that callbackdate is undefined.

Note, I don't have any other <form> ... </form> in the code.

Thanks.
0
 

Expert Comment

by:smoothcat11
ID: 18823485
<td align="left"><script>DateInput('DateWanted', true, 'MM/DD/YYYY')</script></td>

The form will post the variable DateWanted

In MM/DD/YYYY format.  You can change the format with this script to MM-DD-YYYY or whatever.  Thx
0
 

Author Comment

by:drotkopf
ID: 18823755
It doesn't work:

1. When I click on the calendar .jpg to bring up the calendar, it throws an error:
        Line: 80
        Char: 23
        Error: 'document.forms[...].elements is null or not an object.
It's referring to the calendarDateInput.js file:
        if (typeof document.forms[j].elements[i].type == 'string') {
Is that because I don't have <form></form> in my page?

2. Even if I don't use the calendar icon, but just choose the month & day from the pull downs, it doesn't carry the value until my javascript function when I alert(DateWanted.value).

Do you think you can help me out with either this js or with <object classid="java:com.ms.wfc.ui.DateTimePicker" id="DateTimePicker" align="middle" height="30" width="300"> </object> ?

Thanks!

0
 

Author Comment

by:drotkopf
ID: 18898826
smoothcat11, any helk with this?
0
 

Expert Comment

by:smoothcat11
ID: 18898869
DateInput('DateWanted', true, 'MM/DD/YYYY')

Did you try this?  DateWanted would be the value you gave the calander element.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:drotkopf
ID: 18898887
Yes I did.
0
 

Expert Comment

by:smoothcat11
ID: 18899177
I'm not sure?
0
 

Author Comment

by:drotkopf
ID: 18899846
Do you know of any other JS or ActiveX control that I could download?
0
 

Author Comment

by:drotkopf
ID: 18983569
There should be a button here to declare a question forfeited...
0
 

Author Comment

by:drotkopf
ID: 19524136
Thanks!
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 19524369
Your welcome!  Sorry that there isn't a "button" but this gives us a chance to help. :)

Thanks for making the outcome clear.  Most questions aren't so easy to close.

b0lsc0tt
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19544752
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now