0

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 ");
	}
	document.write(myString);*/
	//window.alert(document.getElementById("Fixed_Checkbox").checked);
	//window.alert(FullString);
	return false;
}
<tr>
				<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>
				<hr></td></tr>

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

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by imclumsy
0

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

Traevel

0

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.
:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.