I already saw this answer in the forum passing variables using html "anchor" to JavaScript
<a href="#" onclick="size( 'x' ); return false;">HTML Link</a>
but what I want to do is pass the php variable using html tag to the JavaScript, and right now I cannot run it or make the windows pop out using JS.
Below are my codes for PHP and JS:
reference: html to javascript
php file
while($row = mysqli_fetch_array($varRuleId))
{
echo"<tr>";
echo"<td class=tbl_size id=tbl_size_text colspan='13'>"."<a href='#' onclick='dRaLoader( '$row[resultId]','$srId'); return false;'>". $row['resultId'] ."</a>"."</td>";
echo"<tr>";
}
js file
function dRaLoader()
{
var myWindow = window.open("","myWindow","width=800,height=600");
myWindow.document.write("<p>This is 'myWindow'</p>");
myWindow.opener.document.write("<p>This is the source window!</p>");
}
thanks in advance.