jquery modal & firefox

Posted on 2009-04-23
Medium Priority
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

Albert Van Halen earned 2000 total points
ID: 24222866
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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you put your credit card number into a website for an online transaction, surely you know to look for signs of a secure website such as the padlock icon in the web browser or the green address bar.  This is one way to protect yourself from oth…
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
The viewer will learn how to count occurrences of each item in an array.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

755 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