jquery modal & firefox

Posted on 2009-04-23
Last Modified: 2013-12-07
I am opening a jquery modal thru a function that sends the variables that I need to display information on the openning modal. In IE the information displays but in firefox it does not. I have narrowed it down to this line
var eeid = a.parentNode.parentNode.firstChild.innerHTML;
it is empty that is why in firefox nothing is being returned to display with in the modal if I hardcode it all is well. Here is the whole function. I am using a databinded repeater to get & send the info
function openAdminLeaveBalModal(a) 



        var href = "AdminLeaveBalance.aspx";

        var eeid = a.parentNode.parentNode.firstChild.innerHTML;


        //capture the UserID(txtUserID

        var empLkUpUserId = document.getElementById("txtUserID").value;


       //sending employeeId and the UserId to AdminLeaveBalance.aspx

       var hrefString = "" + href + "?EepEEID=" + eeid + "&UserID=" + empLkUpUserId;


        $("#nest-modal2").load(hrefString).dialog('option','width',800).dialog('option','height',600).dialog('option', 'title', 'HR/Admin Leave Balance').dialog('open'); 

		// remove the x close button


        return false;





<asp:repeater id="rptEmpLookUp" runat="server" onitemdatabound="rptEmpLookUp_ItemDataBound" onitemcommand="rptEmpLookUp_ItemCommand">






         <th>Emp Num</th>




         <th>Work Week</th>









       <td class=""><asp:Literal id="litEepEEID" runat="server" ></asp:Literal></td>

       <td><asp:Button class="button" id="btnTimeSheet" runat="server" text="T" disabled="disabled" /> 

       <td><asp:Literal id="litEecEmpNo" runat="server"></asp:Literal></td>

        <td><asp:Literal id="litEepNameLast" runat="server"></asp:Literal>,

            <asp:Literal id="litEepNameFirst" runat="server"></asp:Literal>

            <asp:Literal id="litEepNameMiddle" runat="server"></asp:Literal></td>

        <td><asp:Literal id="litEmplStatus" runat="server"></asp:Literal></td>

        <td><asp:Literal id="litOrgDesc" runat="server"></asp:Literal></td>

        <td><asp:Literal id="litEmpWorkWeek" runat="server"></asp:Literal></td>

        <td><asp:Literal id="litJbcDesc" runat="server"></asp:Literal></td>

        <td><input type="button" class="button" value="A" id="btnAdj" onclick="openAdminLeaveBalModal(this);return false;"  /></td>







   </asp:Repeater><br />

Open in new window

Question by:mdcadu
    1 Comment
    LVL 19

    Accepted Solution

    innerHTML is not aW3C standard, there are workarounds, but lets use jquery for this...

    You're trying to get the innerContent of the first cell within the row right?
    Try this
    // Getting the text of the first table-cell within the context of the fist table-row of the elements parents
    var eeid = $("td:first", $(a).parents("tr:first")).text();

    Open in new window


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
    SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now