I have a .NET/WebFOCUS reporting application. I have an up-front asp page. On the asp page a user can select from many drop-down boxes. However, some combinations of reports and drop-down boxes are not allowed. I need to incorporate some javascript in the asp page to check for these invalid combinations. I can't seem to get the javascript to work, even the simple alert will not display. Any ideas?
Here's the snipet of the html code from the asp page:
CVASalesReporting <script language="javascript">
function valForm() {
//var selected_report = document.Form1.document.getElementsByName("ucWUC1:RPTSEL_LBOX");
//getElementsByTagName('ucWUC1:RPTSEL_LBOX');
//var selected_report = window.Form1.document.getElementsByName("ucWUC1:RPTSEL_LBOX");
window.alert ("This is a Javascript Alert")
//if (selected_report != "TERRSALES") {
//window.alert (selected_report)
//window.alert ("Invalid report combination.")
//return false;
//}
//else return true;
}
//alert(document.Form1.getElementsByTagName.toString("ucWUC1:RPTSEL_LBOX"));
//alert(pagesObj.options[pagesObj.selectedIndex].value);
//}
function submitForm()
{
var strAction = document.Form1.action;
var strViewState = document.Form1.__VIEWSTATE.value;
document.Form1.target="_new";
// document.Form1.action="http://citms042.arvinmeritor.com/ibi_apps/WFServlet"
document.Form1.__VIEWSTATE.value="";
// document.Form1.submit();
document.Form1.onclick="javascript:valForm()"
//document.Form1.submit(onClick="valForm()")
document.Form1.target="";
document.Form1.action=strAction;
document.Form1.__VIEWSTATE.value=strViewState;
}