sallyoz
04-19-2004, 05:41 PM
I hope!
At the moment this code relies on the sequence q_0, q_1, q_2, q_3
I would like to change it so it is q_00, q_01, q_02, q_03 to allow me to sort.
As a novice I have tried a few things but no luck. I would love some assistance from you gurus
orm, cur_field, cur_field.value)) {
return;
}
}
// check if a quantity entered
if (form.sub_tot.value==0) {
alert("You haven't ordered anything.");
return false;
}
}
function setFocus(fld) {
fld.focus();
fld.select();
}
function isPosInt(frm,fld,val) {
var re = /^\d+$/
if (!re.test(val)) {
alert("Please enter whole numbers only." + val);
if (document.forms[frm.name]) { // protect ns4 in case of nesting
setTimeout("setFocus(document.forms['"+frm.name+"'].elements['"+fld.name+"'])",100);
} else {
fld.focus(); fld.select();
}
return false;
} else return true;
}
// generic positive number decimal formatting function
// from JS Bible by Danny Goodman
function formatDec(expr,decplaces) {
var str = "" + Math.round (eval(expr) * Math.pow(10,decplaces));
while (str.length <= decplaces) {
str = "0" + str;
}
var decpoint = str.length - decplaces;
return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length);
}
function validate() {
if(document.entry_form.name.value.length <1) {
alert('please enter your full name');
}
}
//-->
</script>
At the moment this code relies on the sequence q_0, q_1, q_2, q_3
I would like to change it so it is q_00, q_01, q_02, q_03 to allow me to sort.
As a novice I have tried a few things but no luck. I would love some assistance from you gurus
orm, cur_field, cur_field.value)) {
return;
}
}
// check if a quantity entered
if (form.sub_tot.value==0) {
alert("You haven't ordered anything.");
return false;
}
}
function setFocus(fld) {
fld.focus();
fld.select();
}
function isPosInt(frm,fld,val) {
var re = /^\d+$/
if (!re.test(val)) {
alert("Please enter whole numbers only." + val);
if (document.forms[frm.name]) { // protect ns4 in case of nesting
setTimeout("setFocus(document.forms['"+frm.name+"'].elements['"+fld.name+"'])",100);
} else {
fld.focus(); fld.select();
}
return false;
} else return true;
}
// generic positive number decimal formatting function
// from JS Bible by Danny Goodman
function formatDec(expr,decplaces) {
var str = "" + Math.round (eval(expr) * Math.pow(10,decplaces));
while (str.length <= decplaces) {
str = "0" + str;
}
var decpoint = str.length - decplaces;
return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length);
}
function validate() {
if(document.entry_form.name.value.length <1) {
alert('please enter your full name');
}
}
//-->
</script>