We help IT Professionals succeed at work.

onfocusout is not working in Mozilla ( works fine in IE ).

2,198 Views
Last Modified: 2013-11-07
This code works fine in IE but doesn't work in Mozilla.
If i write onclick in place of onfocusout, it works on both browser.
Any Idea at all ?

Having problem in below written code


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AnkitTestPage.aspx.vb" Inherits="MOPS_AnkitTestPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Setting Height of Iframe to Display All Its Content</title>

<script type="text/javascript">
function getDocHeight(doc)
{
    prompt(document.getElementById('<%=Mytxt.ClientID%>').value);
}

</script>
</head>
<body>
<form runat="server" name="form1">
    <table>
        <tr>
            <td onfocusout="javascript:getDocHeight(1);"  >
                <asp:TextBox runat="server" ID="Mytxt" Text="myText" />
            </td>
        </tr>
    </table>
</form>

</body>
</html>

Note : I am using ASP .Net 2.0 . This is a test example
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.