Currently, we have to start using Edge starts from 15 June according to Microsoft but there is something strange happens in our website. That is if I click on, the popup shows but the following values didn't show up. That only happens in Edge but trying in IE mode, it shows all, and working really well, is there any way to fix it? I will insert screenshot for more details. This one is in IE and after history.php, you can see the values.:
Same link is open in both browser and only Edge is causing error.
Below is JavaScript.
$(document).ready(function () {
$('.rtio').click(function(){
var id = $(this).val();
var na = $(this).text();
if(na != 0){
myWindow = window.open("history.php?id="+id, "_blank", "location=no,toolbar=no,scrollbars=yes,resizable=yes,top=300,left=250,width=1000,height=400");
} else {
alert('no data available');
}
});
$('.tfctg1').click(function(){
var na = $(this).text();
var id = $(this).val();
if(na != 'total' && id != ''){
// alert(na+'\n'+id);
myWindow = window.open("history.php?id="+id, "_blank", "location=no,toolbar=no,scrollbars=yes,resizable=yes,top=300,left=250,width=1000,height=400");
}
});
$('#infobox').draggable();
});
Below is HTML
echo "<td id='rat' class='rtio' value='ctr|".$clstr[$t]."|".$x."|".$c."' title='".$clstr[$t]."|".$x."|".$c."'>";
echo ${'rat'.$c}[$t][$x];
$csv .= ${'rat'.$c}[$t][$x].",";
${'sum_wip_'.$x} += ${'rat'.$c}[$t][$x];
echo "</td>";
Below is in history.php page
$var = explode("|", $_GET['id']); // ctr|".$clstr[$t]."|".$x."|".$c."
<td> does not intend to contain a value attribute, and hence cannot be retrieved by val() using jquery. Maybe IE engine is so sloppy that it allow this unintended behaviour.
Use prop() for retrieving general attributes.
var id = $(this).prop("value");
Or better use a data-* attribute for custom data field to avoid confusion.
HTML
echo "<td id='rat' class='rtio' data-id='ctr|".$clstr[$t]."|".$x."|".$c."' title='".$clstr[$t]."|".$x."|".$c."'>";
JS
var id = $(this).data("id");