I think problem is this:
var $ = function (id) {
return document.getElementById(id);
}
What the hell? Where this come from?
If you intent to use jQuery just use it. Don't make you code a clutter to anyone who gonna see it.
Solution above is example. If you using somewhere function $ anyone assume it's jQuery but in that case it's is not.
Use document.getElementById(id); or use jQuery don't mix those 2.
And for your problem those function are never being executed. Use jQuery or document.ready and change this
function () {
$("btnConfirmOrder").onclick = ConfirmOrder;
$("btnClrFrm").onclick = ClrFrm;
}
to
$(function () {
$("btnConfirmOrder").onclick = ConfirmOrder;
$("btnClrFrm").onclick = ClrFrm;
});
[EDITED]
You have to attach events to your form buttons. Without it your code is never executed.
Use document.onload event for that:
http://www.w3schools.com/jsref/event_onload.asp[
^]
function load() {
$("btnConfirmOrder").onclick = ConfirmOrder;
$("btnClrFrm").onclick = ClrFrm;
}
document.onload=load;
or
<body önload="load" />
Use firebug in ff for debuging your JS code (like opera dragonfly or IE developer tools). Observe console for any JS errors.