View Full Version : Multiple selections/options in a form table

10-24-2003, 10:43 PM
Hello again

In my form I have a table that has a checkbox for a class selection;
A drop list for a start date and end date; and a tuition amount.

My options:

If they select a class but not a start date, I want to prompt the user to select one
from the drop down list.

If the above is true, I want the tuition to be displayed in the textbox. But only if
they have the selected a class.

I want a total for the tuition to be displayed in a text box for all selected classes.

Tuition amounts are all the same.

Here is my JavaScript code:

<script language="JavaScript" type="text/JavaScript">
function checkStartDate () {
error = "";
if (document.theform.cs.value == "true" && document.theform.csstart.value == "0")
{ document.write("Please select a start date.") }

if (error) {
alert (error);
return false;
} else {
alert ("A confirmation e-mail message will be returned.");
return true;

function totalTuition () {
if (document.theform.cs.value == "true" && document.theform.csstart.value <> "0") { cstuition = "400.00"; }


Any help would be appreciated.


10-25-2003, 07:58 PM
if (document.theform.cs.value == "true" && document.theform.csstart.value <> "0")

what do you think the <> will do and what do u want it to do?

11-03-2003, 06:12 PM
That's the default if the start date and class are unchecked.

<> 0, means that a zero will be left in this field.

11-03-2003, 06:39 PM
<> is not a JavaScript operator. If you're looking for NOT EQUAL, try != instead.