Hi I am new to javascript and I am trying to get rid of an object expected error.

Here is the line I'm getting an error at

<td></td><td></td><td align="center">To print this quote click <a href="/broker/OfferSummary.asp?QuoteKey=<%=vQuoteKey%>" target="blank" onChange="enablePRINT()" checked = "checked"> HERE.</a></td>

here is the function enablePRINT()

function enablePRINT()
	//var myString == " ";
	//boolean FixedB = document.getElementById("Fixed_Checkbox").checked;
	//boolean HeatRateB = document.getElementById("HR_Checkbox").checked;
	//boolean MCPE_B = document.getElementById("MCPE_Checkbox").checked;
	if (document.getElementById('Fixed_Check').checked == true) {
		//document.write("Not Checked");
		window.alert('Fixed Check');
		//FullString.concat("Fixed Checked");
	/*if (document.getElementById("HR_Checkbox").checked == true) {
		//document.write("Not Checked");
		window.alert("HeatRateB Checked");
		FullString.concat("Heat Rate Checked");
	if (document.getElementById("MCPE_Checkbox").checked == true) {
		//document.write("Not Checked");
		window.alert("MCPE_B Checked");
		FullString.concat("MCPE Checked");
	/*else {
	if (document.getElementById("Fixed_Checkbox").checked = true)
		myString = myString.concat("Fixed: Yes ");
	if (document.getElementById("HR_Checkbox").checked = true)
		myString = myString.concat("Heat Rate: Yes ");
	if (document.getElementById("MCPE_Checkbox").checked = true)
		myString = myString.concat("MCPE: Yes ");
	return false;
				<td colspan="7"><br><hr><b>Fixed Contract Price</b>			
				<input type="checkbox" id="Fixed_Check" name="Check To Include in QUOTE SHEET"><b>    Check To Include in QUOTE SHEET</b>

Can someone help out? I'm new to javascript. Thanks!

Hi there, onChange cannot be used in <a> . Neither can checked . Try using <a onClick=""> instead. Or make it a checkbox, of course.


I'm sorry I already figured it out. I forgot to mark this post, but thank you for answering...I think that was the change I figured out.