Jump to content

php in ie 11 compatibility mode


flemingmike

Recommended Posts


<script>
//Calculate Labour
    function filllabour(aa) {
	
	//Parse aa
	
	var the_string = aa;
	var parts = the_string.split('-', 2);

		// After calling split(), 'parts' is an array with two elements:
		// parts[0] is 'left or -'
		// parts[1] is 'right of -'

	var the_text = parts[0];
	var the_num  = parts[1];
	
	//Parse aa

	var dblQuantity = document.getElementById('lqlabour-' + the_num).value-0;
	var curRate = document.getElementById("llabour-" + the_num).value-0;
	var curRateHelper = document.getElementById("lhelper-" + the_num).value-0;
	var dblMarkup = document.getElementById("lmarkup-" + the_num).value-0;
	var curTotal = parseFloat(dblMarkup) / 100.0;
	llinetotal = ((dblQuantity * curRate) + (dblQuantity * curRateHelper)) * (1 + curTotal);
	llinetotal = llinetotal.toFixed(2);
    document.getElementById("ltotal-" + the_num).value = llinetotal;
	//document.getElementById(the_num).value = ("test");
	//alert(the_num);
	
	
	//collect all line totals	
	var inputs = document.getElementsByName("ltotal[]");
	var laboursubtotal = 0;

	for (var i = 0.00; i < inputs.length; i++){
		if (inputs[i].type = "text"){
			laboursubtotal += parseFloat(inputs[i].value, 10);
		}
	}
	//collect all line totals
	laboursubtotal = laboursubtotal.toFixed(2);
	document.getElementById("labourtotal").value = laboursubtotal;
	
		
	filltotal();
	
	
    }
//Calculate Labour
</script>

hi, in ie11 we are forced to use compatibility mode for one of our web applications written in php.  above is a script that from what I understand is the error is with getElementsByName.  any suggestions for me in ie11?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.