Issue with Calendar Control not loading in Internet Explorer 9 when using ASP

I have been trying to incorporate a calendar control in my code that selects a date and returns it to a text field. It worked perfectly fine on browsers prior to IE 8, but I'm facing issues with IE 9. Can someone help me troubleshoot this problem and make the calendar control compatible with IE 9 or 10?

Message from F12 Developer Tools Console:

HTML1113: Document mode restarts from IE9 Standards to Quirks

Additionally:

SCRIPT438: Object doesn't support this property or method: 'document.all.calendar1.value'

<head>

<title>SELECT A DATE</title>

<!--<meta http-equiv="X-UA-Compatible" content="IE=8" />-->

<META http-equiv="Content-Type" content="text/html; charset=windows-1252">

<META HTTP-EQUIV="expires" CONTENT="0">

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

</head>

<BODY bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0 bgcolor=#cccac0>

<SCRIPT LANGUAGE=VBSCRIPT>

      Sub window_onunload

            window.returnvalue = formatdatetime(document.all.Calendar1.value,2)

      end sub

</SCRIPT>

<!--<SCRIPT LANGUAGE=VBSCRIPT>

      Sub window_onunload

            window.returnvalue = formatdatetime(document.getElementById("Calendar1"))

      end sub

</SCRIPT>-->

<OBJECT id="Calendar1" style="LEFT: 0px; WIDTH: 289px; TOP: 0px; HEIGHT: 198px"

classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" width=289 height=198 VIEWASTEXT class="Calendar">

<PARAM NAME="_Version" VALUE="524288">

<PARAM NAME="_ExtentX" VALUE="7646">

<PARAM NAME="_ExtentY" VALUE="5239">

<PARAM NAME="_StockProps" VALUE="1">

<PARAM NAME="BackColor" VALUE="-2147483633">

<PARAM NAME="Year" VALUE="<%=year(now())%>">

<PARAM NAME="Month" VALUE="<%=month(now())%>">

<PARAM NAME="Day" VALUE="<%=day(now())%>">

<PARAM NAME="DayLength" VALUE="1">

<PARAM NAME="MonthLength" VALUE="2">

<PARAM NAME="DayFontColor" VALUE="0">

<PARAM NAME="FirstDay" VALUE="1">

<PARAM NAME="GridCellEffect" VALUE="1">

<PARAM NAME="GridFontColor" VALUE="10485760">

<PARAM NAME="GridLinesColor" VALUE="-2147483632">

<PARAM NAME="ShowDateSelectors" VALUE="-1">

<PARAM NAME="ShowDays" VALUE="-1">

<PARAM NAME="ShowHorizontalGrid" VALUE="-1">

<PARAM NAME="ShowTitle" VALUE="-1">

<PARAM NAME="ShowVerticalGrid" VALUE="-1">

<PARAM NAME="TitleFontColor" VALUE="10485760">

<PARAM NAME="ValueIsNull" VALUE="0">

</OBJECT>

<BR>

<center><!-- <INPUT type=button value="Select Date" onClick=window.close></center> -->

<img src="selectadate.png" alt="Select a Date" onClick=window.close>

</BODY>

Answer №1

Consider substituting

document.all

for

document.forms[0]

in case there is only one form in the script

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Testing XMLHttpRequest with Jasmine: A Complete Guide

Is there a way to test the onreadystatechange function on XMLHttpRequest or pure JavaScript AJAX without using jQuery? I need to do this because I'm working on a Firefox extension. It seems like I may have to use spies, but I'm having trouble bec ...

Implementing a versatile free text filter with numerous values using MUI

I am currently working on incorporating a free text filter view using MUI. Although the Autocomplete component already has this feature (when the 'multiple' attribute is enabled), I am looking to input free-form text instead of selecting from pre ...

Differences between addEventListener and jQuery's on method, as well as form.submit and jQuery's

I encountered a situation where callbacks registered using jQuery's on method were not being called when trying to trigger form submission with the HTML Form element object instead of jQuery. After some testing, I discovered that changing the code to ...

Customizing order and limit features in AngularJS

I have a collection of items that I need to organize into separate lists based on priority levels. items = [ {'type': 2, 'priority': 1, 'name': 'one'}, {'type': 1, 'priority': 2, 'na ...

RequestDispatcher.forward() does not work when servlet is invoked through an Ajax POST request

My login page involves user authentication through the firebase and sending the request to a servlet. When I click the submit button with correct credentials, the firebase authentication works, the servlet is called but an error is displayed in the browser ...

Enhance your Morris.js charts by incorporating detailed notes and annotations

Is there a way to include annotations in my morris.js charts? I couldn't find any information about this on their official website. I specifically need to add notes to certain dates. ...

Error in Internet Explorer 8 - the object does not support this property or method

My ExtJS custom "treecombo" works perfectly in Firefox and Chrome, but encounters issues in Internet Explorer. Specifically, I am facing problems with IE8 when trying to run the following code: Ext.define('MyApp.plugins.TreeCombo', { extend: & ...

Build an intricate nested array structure using the properties of an object

My data object is structured like this: "parameters": { "firstName": "Alexa", "lastName": "Simpson", "city": "London" } The task at hand involves implementing the followin ...

Creating a dynamic nested form in AngularJS by binding data to a model

Creating a nested form from a JSON object called formObject, I bind the values within the object itself. By recursively parsing the values, I extract the actual data, referred to as dataObject, upon submission. To view the dataObject in a linear format, r ...

What could this error be in Chrome console: "Uncaught SyntaxError: Unexpected token ':'"

Why am I getting this error in the Chrome console: "Uncaught SyntaxError: Unexpected token ':'"? I have a JSON file located at the root of my application: <script src="levels.json"></script> Here is the content of my JSON file: { ...

retrieving the value of an object key based on changing information

console.log(x, obj.fares) //return undefined output adultFare Object {adultFare: "9.00", childFare: null, seniorCitizenFare: null, disabledFare: null,} How do I retrieve the adultFare value from the object? Is looping through the keys necessary? I expec ...

Obtain a string in JSON format upon clicking in Angular 2

I am working on extracting the title from a json response using a click event. Currently, I can retrieve all the titles when the button is clicked, but I am looking for a way to obtain a specific title based on the button or a href that the user has clicke ...

What is the method for shifting content as the window is resized to ensure it remains in its original position?

My page features a grid with three div elements. Each div is the size of the viewport, resulting in only one div being visible at a time, while the other two remain outside the view. This makes the grid three times larger than the viewport. When resizing ...

Utilizing Jquery to create a carousel with looping functionality for flowing text

I am currently facing an issue with a carousel that contains multiple images and text. In order to make the text responsive, I have implemented a script called FlowText. The script works perfectly on the initial carousel image (the active one), but as soon ...

Hold off on refreshing the page until all the $.get calls have finished executing

I am currently using a piece of JavaScript to execute an Ajax call which returns XML data. This XML is then processed, and another Ajax call is made for each "record" found in the XML to delete that record. However, I am facing an issue where the JavaScrip ...

Receive an error stating "Filename is not defined" when attempting to upload an image in React

Postman functioning properly with my backend code. I utilized form-data and added a random file. The file uploaded successfully to the image folder, but a problem arises when it comes to React. It fails to upload and displays an error on the backend stati ...

Utilize Parse cloud code to navigate and interact with object relationships

I am currently in the process of developing a Parse cloud code function that will produce a similar outcome to a GET request on parse/classes/MyClass, but with the IDs of the relations included. While I have successfully implemented this for a single obje ...

`Enhance Image with a Fresh Hue`

Let me explain my dilemma: I'm dealing with a two-tone png image - one tone is black and the other is transparent. Right now, I'm relying on the background color attribute to dynamically change the color of the transparent section. However, I ...

How to Insert PHP/MySql Data into JavaScript

As I delve deeper into PHP OOP, I feel like I'm making progress in transitioning my website. Currently, each user has their own page with a javascript grid tailored to their specific needs. For easier maintenance, I'm considering the idea of havi ...

Having trouble with the Jquery animate() function?

I recently developed a jQuery animation where clicking on specific buttons triggers a hidden div to slide from left: -650px; to left: 0px;. You can see an example by clicking here. However, I've noticed that when another button is clicked to reveal a ...