hello,
I am building a hefty intranet application. My current situation is leaving me utterly confused. I have three pulldown menus: action_select, station_select, and option_select. What the below function does is simply add URL parameters to a webpage name, and then redirect the current page to the built location string. This works accordingly on my developement computer, but nothing happens at all on a different computer. The only difference is that I am using IE5.5 on my dev computer, and IE5 on the other computer. I am so frustrated because I just cannot find the answer as to why the below code works on one computer and not on another. It even works in NN6.2. Please help. Thanks in advance for your feedback.
function appendStationIDtoURL() {
var action = MM_findObj("action_select"
var station = MM_findObj("station_select"
var choice = MM_findObj("option_select"
// do nothing if the selected choice is the first in the list
if (((action.options[action.selectedIndex].text == "Create New Record" &&
(choice.options[choice.selectedIndex].text != "Invoice Tracking" &&
(station.selectedIndex == 0)) ||
(choice.selectedIndex == 0 || action.selectedIndex == 0))
return false;
var station_id = station.options[station.selectedIndex].value; // get the actual station_id value
var s_name = (station.selectedIndex == 0) ? "" : station.options[station.selectedIndex].text;
var page;
var action;
switch (choice.selectedIndex) {
case 1:
page = "1358.cfm";
break;
case 2:
page = "travel.cfm";
break;
case 3:
page = "tuition.cfm";
break;
case 4:
page = "patient_fund.cfm";
break;
case 5:
page = "journal_logbook.cfm";
break;
case 6:
page = "journal_voucher.cfm";
break;
case 7:
page = "expenditure_logbook.cfm";
break;
case 8:
page = "expenditure_voucher.cfm";
break;
case 10:
page = "invoice_tracking.cfm";
break;
default:
return false;
break;
}
switch (action.selectedIndex) {
case 1:
action = "create";
break;
case 2:
action = "edit";
break;
case 3:
action = "view"; break;
default:
return false;
break;
}
self.location.href = page +'?station_id=' + station_id + '&station_name=' + s_name + '&action=' + action; //redirect this page
return true; // everything was successful
}
I am building a hefty intranet application. My current situation is leaving me utterly confused. I have three pulldown menus: action_select, station_select, and option_select. What the below function does is simply add URL parameters to a webpage name, and then redirect the current page to the built location string. This works accordingly on my developement computer, but nothing happens at all on a different computer. The only difference is that I am using IE5.5 on my dev computer, and IE5 on the other computer. I am so frustrated because I just cannot find the answer as to why the below code works on one computer and not on another. It even works in NN6.2. Please help. Thanks in advance for your feedback.
function appendStationIDtoURL() {
var action = MM_findObj("action_select"
var station = MM_findObj("station_select"
var choice = MM_findObj("option_select"
// do nothing if the selected choice is the first in the list
if (((action.options[action.selectedIndex].text == "Create New Record" &&
(choice.options[choice.selectedIndex].text != "Invoice Tracking" &&
(station.selectedIndex == 0)) ||
(choice.selectedIndex == 0 || action.selectedIndex == 0))
return false;
var station_id = station.options[station.selectedIndex].value; // get the actual station_id value
var s_name = (station.selectedIndex == 0) ? "" : station.options[station.selectedIndex].text;
var page;
var action;
switch (choice.selectedIndex) {
case 1:
page = "1358.cfm";
break;
case 2:
page = "travel.cfm";
break;
case 3:
page = "tuition.cfm";
break;
case 4:
page = "patient_fund.cfm";
break;
case 5:
page = "journal_logbook.cfm";
break;
case 6:
page = "journal_voucher.cfm";
break;
case 7:
page = "expenditure_logbook.cfm";
break;
case 8:
page = "expenditure_voucher.cfm";
break;
case 10:
page = "invoice_tracking.cfm";
break;
default:
return false;
break;
}
switch (action.selectedIndex) {
case 1:
action = "create";
break;
case 2:
action = "edit";
break;
case 3:
action = "view"; break;
default:
return false;
break;
}
self.location.href = page +'?station_id=' + station_id + '&station_name=' + s_name + '&action=' + action; //redirect this page
return true; // everything was successful
}