onChange says function not defined in external js file

I have the following code as js for <a href=“http://www.oxbowcreations.com/wedding/personalize.php”>this</a> site.


// JavaScript Document

function setQty(id)
{
	window.$qty = document.getElementById(id).value;
	alert('The qty is' . window.$qty);
}

function setResp(id)
{
	window.$response = document.getElementById(id).value;
}

function calculateCost(qty, response)
{
	window.$price = 0;
	
	if(response = 1)
	{
		window.$price = qty(2.25) + qty(.75);
	}
	else
	{
		window.$price = qty(2.25);
	}
}

function qtyDisc(qty)
{
	if(qty > 100 && qty < 200)
	{
		window.$price -= qty(.25);
	}
	else if(qty >= 200 && qty < 500)
	{
		window.$price -= qty(.50);
	}
}

function changePrice()
{
	document.getElementByID("price").value = "$" . window.$price.toFixed(2);
}
function updatePrice(window.$qty, window.$response)
{
	calculateCost(qty, response);
	qtyDisc(qty);
	changePrice();
}

I have no clue what the problem is.

As you can tell I am just a beginner but any help would be appreciated.

Thanks in advance!

in changePrice getElementByID should have a lowercase d on the end.

document.getElementByID() isn’t defined anywhere but document.getElementById() is.

Thanks, sorry it took so long to respond.

Wonderful how one little thing like that makes nothing work.