Mattquantic,
I'm never fond of creating globals when you actually want to pass a parameter.
You could add a new parameter to an existing function:
f(a,b) {...} becomes f(a,b,c) {...}
where inside f you can test on passing c:
function f(a,b,c) {
c = (c ? c : defaultValueFor_c)
...
}
or...
Hi Nematoth,
I see only one checkbox in the form (bookid[])
Try "if (document.addbooks.elements[i].checked)"
If you want exactly one book checked, why not use a radiogroup? Initially have a dummy option (first option) in the group checked (saying "Notting selected" or something) and then (on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.