jquery modal & firefox

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
		$("#nest-modal2").parents(".ui-dialog:first").find(".ui-dialog-titlebar-close").remove(); 
        return false;
    }	
 
#########################
Repeater
############
<asp:repeater id="rptEmpLookUp" runat="server" onitemdatabound="rptEmpLookUp_ItemDataBound" onitemcommand="rptEmpLookUp_ItemCommand">
    <HeaderTemplate>
    <table>
    <thead>
     <tr>
         <th>Time</th>
         <th>Emp Num</th>
         <th>Name(Last,First,Middle)</th>
         <th>Status</th>
         <th>Division</th>
         <th>Work Week</th>
         <th>Position</th>
         <th>Adj</th>
     </tr>
    </thead>
    </HeaderTemplate>
    <ItemTemplate> 
   
      <tr>
       <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>
        </tr>
     </ItemTemplate>
     
     <FooterTemplate>
       </table>
     </FooterTemplate> 
   </asp:Repeater><br />

Open in new window

mdcaduAsked:
Who is Participating?
 
Albert Van HalenConnect With a Mentor Analyst developerCommented:
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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.