Domanda

I have a problem with a web page using the function getyear(). The page is part of our parent company's website, but I don't have control over it. It is trying to validate an input date by comparing the four-digit year 2014 to checkdate.getyear() which returns 114. Obviously this will never succeed.

The answer I get from the parent company is 'Use IE Version 9 or less'. And under those situations, getyear() returns 2014.

Is there a way to get this javascript to work WITHOUT actually rolling back the browser to IE9? A way to run IE in 'ie9' mode? A way to inject code into the page?

I have very very little javascript knowledge so I'm looking for an easy-to-implement solution.

È stato utile?

Soluzione 2

The javascript function needs to be changed on the front end.

Altri suggerimenti

Try this: http://api.jquery.com/jquery.browser/

This might allow you to put in a if that might just do the work.

EDIT I was wrong as comments pointed out that the method is no more active. I found out a post, a bit more complicated, which might just do the job. Look around.

How can you detect the version of a browser?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top