In Option tag onClick Event work properly in Firefox and call myPurchaseTotal and Ajax work perfectly but In chrome its not work . This is View File
<select type="text" class="form-control" id="product_id" name="product_id" style="" onchange="copy_data(this.form)">
<option>Select Product</option>
@foreach($product as $pro)
<option onclick="myPurchaseTotal('<?php echo $pro->p_id ?>', 'purchase_total')" value=""></option>
@endforeach
</select>
This Is Ajax Function
function myPurchaseTotal(given_text, objID)
{
if (given_text)
{
serverPage = 'purchasetotal/' + given_text;
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function ()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
document.getElementById(objID).innerHTML = xmlhttp.responseText;
}
}
}
xmlhttp.send(null);
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2lEjmN9
via IFTTT
Aucun commentaire:
Enregistrer un commentaire