Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's probably being caused </p> <pre><code>if (!document.getElementsByTagName || !document.createTextNode) return; </code></pre> <p>If you are getting undefined.</p> <p>Best thing I can suggest is throw a load of debugging in e.g. :</p> <pre><code>&lt;script type="text/javascript"&gt; function getTableRow() { console.log( "getTableRow function called" ); var rowIdx; var rowData= []; var selectedRow; var rowCellValue; if (!document.getElementsByTagName || !document.createTextNode) { console.log( document.getElementsByTagName, document.createTextNode, "Returning early" ); return; } var rows = document.getElementById('products_table').getElementsByTagName('tbody')[0].getElementsByTagName('tr'); for (i = 0; i &lt; rows.length; i++) { rows[i].onclick = function() { rowIdx = this.rowIndex; selectedRow= this.cells; for(j= 0;j&lt;selectedRow.length;j++){ rowCellValue= selectedRow[j].textContent || selectedRow[j].innerText; rowData.push('cell '+j+': '+rowCellValue); } } } console.log( "Returning correctly" ); return "Row #" +rowIdx+'. '+ rowData[i]; } &lt;/script&gt; </code></pre> <p>If you're using firefox get yourself <a href="http://getfirebug.com/" rel="nofollow">http://getfirebug.com/</a> and see what the console outputs</p> <p>If you're using chrome press F12 and click on console and see what that says</p> <p>If you're unsure about what's available in the document element try :</p> <p><a href="https://developer.mozilla.org/en/docs/Web/API/Element" rel="nofollow">https://developer.mozilla.org/en/docs/Web/API/Element</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/ie/ms535862(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ie/ms535862(v=vs.85).aspx</a></p> <p><a href="http://www.w3schools.com/jsref/dom_obj_document.asp" rel="nofollow">http://www.w3schools.com/jsref/dom_obj_document.asp</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload