开发者

ie7 not letting me type in textbox but yes chrome, firefox, ie8

I have the following .jsp (signIn.jsp):

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<div id="logBanner">

<form id="regForm" class="little-form" action="../user/signIn" method="post" >  
                    <label id="lblNickname" for="txtNickname">Nombre de usuario:</label>
                    <input id="txtNickname" type="text" name="nickname"  />
                    <label id="lblPsw" for="txtPsw">Contraseña:</label>
                    <input id="txtPsw" type="password" name="password"/>
                    <p><button type="submit" id="btnIngresar" >Ingresar</button></p>
</form> 
</div>

When the user clicks on a button in the homepage the following javascript function is called which renders the form:

function displaySignForm(){

    jQuery.get('../../jsp/signIn.jsp', {}, function renderForm(data, textStatus, XMLHttpRequest){   
     var log = document.getElementById('log');
     preDiv = document.getElementById('signInWindow');
     if (preDiv==null){
         var div = document.createElement('div');
         div.id = "signInWindow";
         div.innerHTML = data;
         log.appendChild(div);
     }
     else {
         log.removeChild(preDiv);
     }
    }
    );
}

Which gets the form and shows it in the web page.

My problem is the following: on ie7 I can´t neither write on the textbox nor press the submit button, it looks like if e开发者_运维知识库verything was disabled. It does work fine on ie8, chrome and firefox. What could it be?

Thanks!


It could be a problem with z-index of divs. I have faced similar issues in IE7 and used this script:

<!--[if IE]>

jQuery(document).ready(function() {
//zIndex FIX for IE 7 and 8 Starts Here

    jQuery(function() {
        var zIndexNumber = 9000;
        jQuery('div').each(function() {
            jQuery(this).css('zIndex', zIndexNumber);
            zIndexNumber -= 10;         

            var overlay = zIndexNumber * 1000;
            var overlaylevel = overlay * 10;
            jQuery('#sbox-overlay').css('zIndex', overlay);
            jQuery('#sbox-window').css('zIndex', overlay);
        });

    }); 
//zIndex FIX for IE 7 and 8 ENDS Here 
});
</script>
<![endif]-->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜