Why doesn’t dynamic work in IE

When you click on the link, the layer with the authorization form is loaded.
Works great in Chrome
It also opens in Opera and Mozilla,
and IE says that I have a script error line 5 character 2, or when executing the close_autorization()function, an error occurs on line 2 character 2.


    <a href="javascript:autorization()"></a>
    <p id="par" name="par"></p>
    <SCRIPT src="js/InputPlaceholder.js" LANGUAGE='JavaScript'> </SCRIPT>


function close_autorization(){
function autorization(){
    par.innerHTML='<b> </b>';

Answer 1, authority 100%

href=”javascript:authorization()” is bad manners. Use the onclick() event:

<a href="#" onclick="autorization(); return false;"></a>


You can completely remove the href, but then the ‘a’ tag will not be perceived as a link and you will need to write styles explicitly. Something like this:

<a style="text-decoration: underline; cursor: pointer; color: #3060A8;" onclick="autorization(); return false;"></a>

And there may be glitches in IE6

Answer 2, authority 100%

Summarizing all of the above:

<a href="#" onClick="return autorization();"></a>
function autorization(){
    var blok=' ';
    document.getElementById('par').innerHTML = blok;
    return false;

In general, it’s better to immediately write a login form with style="display:none"and then just change it to style.display.