I have a form which contains a button, which when clicked will allow the user to search a table. I is working in IE, but not in Netscape. What is supposed to happen is that the user has a choice between typing in search criteria in text box 1 or selecting a common search item from a drop down list in select box 2. Then they click on the "Find" button which takes them to a javascript which in turns takes them to a perl script which displays the search results, where they select the radio button of the item they want and that value in turn is put back into the text box 1. Then they proceed filling out the form and click submit at the bottom of the form. I have added alert boxes to my javascript and in Netscape, null values are returned where there should be a value. Here are the call and script:
<input type="button" name="choice" onClick="searchProgramIndvTr()"; value="Find Course">
function searchProgramIndvTr() {
alert ("function searchProgramIndvTr"
if (document.IndvTr.Special.selectedIndex == 0) {
alert ("if Special is "+document.IndvTr.Special.value);
if (document.IndvTr.Program.value.length == 0 || document.IndvTr.Program.value == "+" {
alert ("if Program is "+document.IndvTr.Program.value);
document.IndvTr.Program.value = "+";
x=window.confirm ("Leaving the Program Field blank\nwill return the complete Catalog Listing.\n\nThis listing may take a few minutes to load.\n\nClick OK to Continue"
if (!x) {//
document.IndvTr.Program.focus();
return false;
}//
} else {
alert ("else Program is "+document.IndvTr.Program.value);
var criteria=document.IndvTr.Program.value;
alert ("Program criteria is "+criteria);
}
} else {
alert ("else Special is "+document.IndvTr.Special.value);
var criteria=document.IndvTr.Special.value;
alert ("criteria is "+criteria);
}
<input type="button" name="choice" onClick="searchProgramIndvTr()"; value="Find Course">
function searchProgramIndvTr() {
alert ("function searchProgramIndvTr"
if (document.IndvTr.Special.selectedIndex == 0) {
alert ("if Special is "+document.IndvTr.Special.value);
if (document.IndvTr.Program.value.length == 0 || document.IndvTr.Program.value == "+" {
alert ("if Program is "+document.IndvTr.Program.value);
document.IndvTr.Program.value = "+";
x=window.confirm ("Leaving the Program Field blank\nwill return the complete Catalog Listing.\n\nThis listing may take a few minutes to load.\n\nClick OK to Continue"
if (!x) {//
document.IndvTr.Program.focus();
return false;
}//
} else {
alert ("else Program is "+document.IndvTr.Program.value);
var criteria=document.IndvTr.Program.value;
alert ("Program criteria is "+criteria);
}
} else {
alert ("else Special is "+document.IndvTr.Special.value);
var criteria=document.IndvTr.Special.value;
alert ("criteria is "+criteria);
}