Created a form in an html page with the code below. The form simply took in the parameters that have been setup in SharePoint and finds the correct report for the user.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Report Finder</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="Report-box-large.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/SiteCollectionDocuments/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
getCountriesGIPS()
// Get all research PMA Funds.
//getPMAFunds();
// get countries
getCountries();
//readFile();
//getSpacedFields();
// function to read from a text file held in SharePoint instead of SharePoint list data
function readFile()
{
jQuery.get('ReportFinderSetup.txt', function(data) {
displayFile(data);
//process text file line by line
//$('#div').html(data.replace('n','<br />'));
});
}
function displayFile(strData)
{
alert(strData);
}
// End of area to read from a text file held in SharePoint instead of SharePoint list data
// function to check for all input required for a query for report names have been selected.
function checkInputSelected()
{
var bReturn = true;
if (document.forms['ValidForm'].Radio1.checked || document.forms['ValidForm'].Radio2.checked || document.forms['ValidForm'].Radio3.checked)
{
//alert("Asset Type Selected");
}
else
{
//alert("A Fund Type must be selected.");
bReturn = false;
}
if (document.forms['ValidForm'].RadioEQ.checked || document.forms['ValidForm'].RadioFI.checked || document.forms['ValidForm'].RadioMA.checked || document.forms['ValidForm'].RadioGIPS.checked)
{
//alert("Dept Type Selected");
}
else
{
//alert("An Asset Type must be selected.");
bReturn = false;
}
if (document.forms['ValidForm'].SelectCountry.value == "None")
{
//alert("A Country must be selected");
bReturn = false;
// Clear the Funds Drop Down as no country has been selected
clearFundsDropFown();
}
// If peer rank was selected then do a peer rank query but return false.
// peer rank report are not based on country or asset type.
if (document.forms['ValidForm'].Radio2.checked)
{
getPeerRanking();
bReturn = false;
}
else if (document.forms['ValidForm'].RadioGIPS.checked) //If GIPS was selected then do a GIPS query but return false.
//GIPS report are not based on asset type.
{
getGIPSReports();
bReturn = false;
}
return bReturn;
}
// function called just before displayReports to check whether the essential inputs been selected.
// Purpose is to display a notification to users if they have not selected anything or all required input
// and wondering why no response when clicking on the submit button
function checkFundTypesSelected()
{
if (!document.forms['ValidForm'].Radio2.checked)
{
if (document.forms['ValidForm'].RadioEQ.checked || document.forms['ValidForm'].RadioFI.checked || document.forms['ValidForm'].RadioMA.checked || document.forms['ValidForm'].RadioGIPS.checked)
{
//alert("Dept Type Selected");
}
else
{
alert("An asset type must be selected.");
document.forms['ValidForm'].RadioEQ.focus();
return false;
}
if (document.forms['ValidForm'].Radio1.checked || document.forms['ValidForm'].Radio2.checked || document.forms['ValidForm'].Radio3.checked || document.forms['ValidForm'].RadioGIPS.checked)
{
//alert("Asset Type Selected");
}
else
{
alert("A fund type must be selected.");
document.forms['ValidForm'].Radio1.focus();
return false;
}
if (document.forms['ValidForm'].SelectCountry.value == "None")
{
alert("A country must be selected.");
document.forms['ValidForm'].SelectCountry.focus();
return false;
}
}
return true;
}
// function that clears the fund's drop down, called when user selects None in the country dropdown.
function clearFundsDropFown()
{
//Clear the dropdown if there is anything.
document.forms['ValidForm'].Select1.options.length = 0;
document.forms['ValidForm'].Select1.options[0] = new Option("(None)", "None");
}
// main function that get parameters and builds query to get the report names from SharePoint list
function getPMAFunds()
{
var strDeptValue = "";
var strRegionValue = "";
var strReportTypeValue = "";
var strReportFinderType = "Active";
if (checkInputSelected()==false)
{
return;
}
else
{
// Set the query variable parameters
if (document.forms['ValidForm'].RadioEQ.checked)
{
strDeptValue = "Equities";
}
if (document.forms['ValidForm'].RadioFI.checked)
{
strDeptValue = "Fixed Income";
}
if (document.forms['ValidForm'].Radio1.checked)
{
strReportTypeValue = "Attribution";
}
if (document.forms['ValidForm'].Radio3.checked)
{
strReportTypeValue = "Characteristics";
}
if (document.forms['ValidForm'].RadioMA.checked)
{
strDeptValue = "Multi Asset";
}
if (document.forms['ValidForm'].RadioGIPS.checked)
{
strDeptValue = "GIPS";
}
strRegionValue = document.forms['ValidForm'].SelectCountry.value;
//alert(strDeptValue + " " + strRegionValue + " " + strReportTypeValue + " " + strReportFinderType);
}
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Finder Lookup</listName> \
<query><Query><Where><And><And><And><Contains><FieldRef Name='Asset_Type'/><Value Type='Text'>"+strDeptValue+"</Value></Contains> \
<Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
</And> \
<Contains><FieldRef Name='Country'/><Value Type='Text'>"+strRegionValue+"</Value></Contains> \
</And> \
<Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
</And> \
</Where><OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Display_Code' /> \
<FieldRef Name='Asset_Type' /> \
<FieldRef Name='Report_Code' /> \
<FieldRef Name='Country' /> \
<FieldRef Name='Live' /> \
<FieldRef Name='Report_Type' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "/myserver/pma/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processPMAFunds,
contentType: "text/xml; charset=\"utf-8\""
});
});
}
function processPMAFunds(xData, status)
{
var strForDropDown = "";
$(xData.responseXML).find("z\\:row, row").each(function() {
strForDropDown = strForDropDown + $(this).attr("ows_Display_Code") + "@" + $(this).attr("ows_Report_Code") + "@" +"\n";
});
// Now populate the department dropdown with our extracted data
//alert(strForDropDown);
populateFunds(strForDropDown);
}
// End of area that get parameters and builds query to get the report names from SharePoint list
// Get all Peer ranking funds
function getPeerRanking()
{
var strReportTypeValue = "Peer";
var strReportFinderType = "Active";
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Finder Lookup</listName> \
<query><Query><Where><And><Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
<Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
</And> \
</Where><OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Display_Code' /> \
<FieldRef Name='Report_Code' /> \
<FieldRef Name='Country' /> \
<FieldRef Name='Live' /> \
<FieldRef Name='Report_Type' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "/myserver/pma/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processPeerRankFunds,
contentType: "text/xml; charset=\"utf-8\""
});
});
}
function processPeerRankFunds(xData, status)
{
var strForDropDown = "";
$(xData.responseXML).find("z\\:row, row").each(function() {
strForDropDown = strForDropDown + $(this).attr("ows_Display_Code") + "@" + $(this).attr("ows_Report_Code") + "@" +"\n";
});
// Now populate the department dropdown with our extracted data
populateFunds(strForDropDown);
}
// Get all GIPS Report
function getGIPSReports()
{
var strReportTypeValue = "GIPS";
var strReportFinderType = "Active";
var strCountry = document.forms['ValidForm'].SelectCountry.value;
$(document).ready(function() {
var soapEnv = ""
// If no country was selected then just get all active GIPS reports.
if (strCountry == "None")
{
soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Finder Lookup</listName> \
<query><Query><Where><And><Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
<Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
</And> \
</Where><OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Display_Code' /> \
<FieldRef Name='Report_Code' /> \
<FieldRef Name='Country' /> \
<FieldRef Name='Live' /> \
<FieldRef Name='Report_Type' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
}
else // Get current selected country into the query if one was selected.
{
soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Finder Lookup</listName> \
<query><Query><Where><And><And><Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
<Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
</And> \
<Contains><FieldRef Name='Country'/><Value Type='Text'>"+strCountry+"</Value></Contains> \
</And> \
</Where><OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Display_Code' /> \
<FieldRef Name='Report_Code' /> \
<FieldRef Name='Country' /> \
<FieldRef Name='Live' /> \
<FieldRef Name='Report_Type' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
}
$.ajax({
url: "/myserver/pma/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processGIPSFunds,
contentType: "text/xml; charset=\"utf-8\""
});
});
}
function processGIPSFunds(xData, status)
{
var strForDropDown = "";
$(xData.responseXML).find("z\\:row, row").each(function() {
strForDropDown = strForDropDown + $(this).attr("ows_Display_Code") + "@" + $(this).attr("ows_Report_Code") + "@" +"\n";
});
// Now populate the department dropdown with our extracted data
populateFunds(strForDropDown);
}
// function that populates fund drop down
function populateFunds(strForDropDown)
{
//Clear the dropdown if there is anything.
document.forms['ValidForm'].Select1.options.length = 0;
document.forms['ValidForm'].Select1.options[0] = new Option("(None)", "None");
if (strForDropDown != "")
{
var item_array = strForDropDown.split("\n");
for (var iCount = 0; iCount < (item_array.length-1); iCount++)
{
//alert(item_array[iCount].toString());
var items = item_array[iCount].split("@");
try
{
// Force "None" into all values because it needs this value to fool SharePoint into accepting it when saving
document.forms['ValidForm'].Select1.options[iCount+1] = new Option(items[0], items[1]);
}
catch(ex)
{
alert("Possible array out of bound error - populateFunds(strForDropDown)");
}
}
}
else
{
document.forms['ValidForm'].Select1.options[0] = new Option("(None)", "None");
}
}
// Populate Country Drop Down from SharePoint List MA Report Finder Lookup Countries block //
function getCountries()
{
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Finder Lookup Countries</listName> \
<query><Query> \
<OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Title' /> \
<FieldRef Name='Country' /> \
<FieldRef Name='Country_Code' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "/myserver/pma/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processCountries,
contentType: "text/xml; charset=\"utf-8\""
});
});
}
function processCountries(xData, status)
{
var strForDropDown = "";
$(xData.responseXML).find("z\\:row, row").each(function() {
strForDropDown = strForDropDown + $(this).attr("ows_Country") + "@" + $(this).attr("ows_Country_Code") + "@" +"\n";
});
// Now populate the department dropdown with our extracted data
populateCountry(strForDropDown);
}
// Populate Country Drop Down from SharePoint List MA Report Finder Lookup Countries block //
// With Filter for GIPS Country
function getCountriesGIPS()
{
var strReportTypeValue = "1";
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Finder Lookup Countries</listName> \
<query><Query><Where><Contains><FieldRef Name='GIPS'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains></Where> \
<OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Title' /> \
<FieldRef Name='Country' /> \
<FieldRef Name='Country_Code' /> \
<FieldRef Name='GIPS' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "/myserver/pma/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processCountriesGIPS,
contentType: "text/xml; charset=\"utf-8\""
});
});
}
function processCountriesGIPS(xData, status)
{
var strForDropDown = "";
$(xData.responseXML).find("z\\:row").each(function() {
strForDropDown = strForDropDown + $(this).attr("ows_Country") + "@" + $(this).attr("ows_Country_Code") + "@" + $(this).attr("ows_GIPS") +"\n";
});
// Now populate the department dropdown with our extracted data
alert(strForDropDown);
}
function populateCountry(strForDropDown)
{
//Clear the dropdown if there is anything.
document.forms['ValidForm'].SelectCountry.options.length = 0;
document.forms['ValidForm'].SelectCountry.options[0] = new Option("(None)", "None");
if (strForDropDown != "")
{
var item_array = strForDropDown.split("\n");
for (var iCount = 0; iCount < (item_array.length-1); iCount++)
{
//alert(item_array[iCount].toString());
var items = item_array[iCount].split("@");
try
{
// Force "None" into all values because it needs this value to fool SharePoint into accepting it when saving
document.forms['ValidForm'].SelectCountry.options[iCount+1] = new Option(items[0], items[1]);
}
catch(ex)
{
alert("Possible array out of bound error - populateCountry(strForDropDown)");
}
}
}
else
{
document.forms['ValidForm'].SelectCountry.options[0] = new Option("(None)", "None");
}
}
// End of Populate Country Drop Down from SharePoint List MA Report Finder Lookup Countries block //
// function that displays the report after the submit been pressed.
function displayReport()
{
if(checkFundTypesSelected() == true)
{
if(document.forms['ValidForm'].Radio1.checked)
{
if (UrlExists('/myserver/pma/Shared%20Documents/ATTRIBUTION_PERFORMANCE/All%20Files/' + document.forms['ValidForm'].Select1.value + document.forms['ValidForm'].Select3.value + document.forms['ValidForm'].Select2.value + '.xls') == true)
{
var newwindow=window.open('/myserver/pma/Shared%20Documents/ATTRIBUTION_PERFORMANCE/All%20Files/' + document.forms['ValidForm'].Select1.value + document.forms['ValidForm'].Select3.value + document.forms['ValidForm'].Select2.value + '.xls', 'window2', 'toolbar=yes,resizable=yes,directories=no,status=no,menubar=no');
}
else
{
if (document.forms['ValidForm'].Select1.value != "None")
{
alert("PMA report that was selected for " + document.forms['ValidForm'].Select2.options[document.forms['ValidForm'].Select2.selectedIndex].text + " " + document.forms['ValidForm'].Select3.value + " : " + document.forms['ValidForm'].Select1.options[document.forms['ValidForm'].Select1.selectedIndex].text + " is not available to view yet.");
}
else
{
alert("A fund must be selected.");
document.forms['ValidForm'].Select1.focus();
}
}
}
else if(document.forms['ValidForm'].Radio2.checked)
{
if (UrlExists('/myserver/pma/Shared%20Documents/PEER_PERFORMANCE/All%20Files/' + document.forms['ValidForm'].Select1.value + document.forms['ValidForm'].Select2.value + document.forms['ValidForm'].Select3.value + '.xls') == true)
{
var newwindow=window.open('/myserver/pma/Shared%20Documents/PEER_PERFORMANCE/All%20Files/' + document.forms['ValidForm'].Select1.value + document.forms['ValidForm'].Select2.value + document.forms['ValidForm'].Select3.value + '.xls', 'window2', 'toolbar=yes,resizable=yes,directories=no,status=no,menubar=no');
}
else
{
if (document.forms['ValidForm'].Select1.value != "None")
{
alert("PMA report that was selected for " + document.forms['ValidForm'].Select2.options[document.forms['ValidForm'].Select2.selectedIndex].text + " " + document.forms['ValidForm'].Select3.value + " : " + document.forms['ValidForm'].Select1.options[document.forms['ValidForm'].Select1.selectedIndex].text + " is not available to view yet.");
}
else
{
alert("A fund must be selected.");
document.forms['ValidForm'].Select1.focus();
}
}
}
else if(document.forms['ValidForm'].Radio3.checked)
{
if (UrlExists('/myserver/pma/Shared%20Documents/CHARACTERISTICS/All%20Files/' + document.forms['ValidForm'].Select1.value + document.forms['ValidForm'].Select3.value + document.forms['ValidForm'].Select2.value + '.xls') == true)
{
var newwindow=window.open('/myserver/pma/Shared%20Documents/CHARACTERISTICS/All%20Files/' + document.forms['ValidForm'].Select1.value + document.forms['ValidForm'].Select3.value + document.forms['ValidForm'].Select2.value + '.xls', 'window2', 'toolbar=yes,resizable=yes,directories=no,status=no,menubar=no');
}
else
{
if (document.forms['ValidForm'].Select1.value != "None")
{
alert("PMA report that was selected for " + document.forms['ValidForm'].Select2.options[document.forms['ValidForm'].Select2.selectedIndex].text + " " + document.forms['ValidForm'].Select3.value + " : " + document.forms['ValidForm'].Select1.options[document.forms['ValidForm'].Select1.selectedIndex].text + " is not available to view yet.");
}
else
{
alert("A fund must be selected.");
document.forms['ValidForm'].Select1.focus();
}
}
}
else if(document.forms['ValidForm'].RadioGIPS.checked)
{
if (UrlExists('/myserver/pma/Shared%20Documents/GIPS/NEW GIPS Report/' + document.forms['ValidForm'].Select3.value + document.forms['ValidForm'].Select2.value + " " + document.forms['ValidForm'].Select1.value) == true)
{
var newwindow=window.open('/myserver/pma/Shared%20Documents/GIPS/NEW GIPS Report/' + document.forms['ValidForm'].Select3.value + document.forms['ValidForm'].Select2.value + " " + document.forms['ValidForm'].Select1.value, 'window2', 'toolbar=yes,resizable=yes,directories=no,status=no,menubar=no');
}
else
{
if (document.forms['ValidForm'].Select1.value != "None")
{
alert("PMA report that was selected for " + document.forms['ValidForm'].Select2.options[document.forms['ValidForm'].Select2.selectedIndex].text + " " + document.forms['ValidForm'].Select3.value + " : " + document.forms['ValidForm'].Select1.options[document.forms['ValidForm'].Select1.selectedIndex].text + " is not available to view yet.");
}
else
{
alert("A fund must be selected.");
document.forms['ValidForm'].Select1.focus();
}
}
}
}
}
// function that can check whether URL returns not found 404.
function UrlExists(url)
{
// Uncomment to view full path of report that program is trying to retrieve
//alert(url);
//document.all.Report_Name_Retrieved.innerHTML = "Report Name : " + url;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
var http = new XMLHttpRequest();
}
else
{// code for IE6, IE5
var http = new ActiveXObject("Microsoft.XMLHTTP");
}
//var http = new XMLHttpRequest();
http.open('HEAD', url, false);
http.send();
return http.status!=404;
}
// Test area to get fields if they had a space or invalid character set inthename, then SharePoint replaces it with _x00xx_
function getSpacedFields()
{
var strDeptValue = "EQ";
var strRegionValue = "HK";
var strReportTypeValue = "Attribution";
var strReportFinderType = "Active";
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>PMA Report Names</listName> \
<query><Query><Where><Contains><FieldRef Name='Asset_x0020_Type'/><Value Type='Text'>"+strDeptValue+"</Value></Contains> \
</Where><OrderBy><FieldRef Name='Title' Ascending='TRUE' /></OrderBy></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='Title' /> \
<FieldRef Name='Asset_x0020_Type' /> \
<FieldRef Name='Region' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "/myserver/pma/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResearchDocsSpaceFields,
contentType: "text/xml; charset=\"utf-8\""
});
});
}
function processResearchDocsSpaceFields(xData, status)
{
var strForDropDown = "";
$(xData.responseXML).find("z\\:row, row").each(function() {
strForDropDown = strForDropDown + $(this).attr("ows_Region") + "@" + $(this).attr("ows_Asset_x0020_Type") + "@" +"\n";
});
// Now populate the department dropdown with our extracted data
alert(strForDropDown);
}
// End of Test area to get fields if they had a space or invalid character set inthename, then SharePoint replaces it with _x00xx_
</script>
<SCRIPT language="javascript">
window.onload = function function_Select2(){
document.forms['ValidForm'].Select2.options.length = 0
document.forms['ValidForm'].Select2.options[0] =new Option('January','01');
document.forms['ValidForm'].Select2.options[1] =new Option('February','02');
document.forms['ValidForm'].Select2.options[2] =new Option('March','03');
document.forms['ValidForm'].Select2.options[3] =new Option('April','04');
document.forms['ValidForm'].Select2.options[4] =new Option('May','05');
document.forms['ValidForm'].Select2.options[5] =new Option('June','06');
document.forms['ValidForm'].Select2.options[6] =new Option('July','07');
document.forms['ValidForm'].Select2.options[7] =new Option('August','08');
document.forms['ValidForm'].Select2.options[8] =new Option('September','09');
document.forms['ValidForm'].Select2.options[9] =new Option('October','10');
document.forms['ValidForm'].Select2.options[10] =new Option('November','11');
document.forms['ValidForm'].Select2.options[11] =new Option('December','12');
var date_now = new Date();
var month_now = date_now.getMonth();
document.forms['ValidForm'].Select2.options[month_now].selected=true;
document.forms['ValidForm'].Select3.options.length = 0
document.forms['ValidForm'].Select3.options[0] =new Option('','')
document.forms['ValidForm'].Select3.options[1] =new Option('Year 2012','2012');
document.forms['ValidForm'].Select3.options[2] =new Option('Year 2013','2013');
document.forms['ValidForm'].Select3.options[3] =new Option('Year 2014','2014');
document.forms['ValidForm'].Select3.options[4] =new Option('Year 2015','2015');
document.forms['ValidForm'].Select3.options[5] =new Option('Year 2016','2016');
document.forms['ValidForm'].Select3.options[4].selected=true;
document.forms['ValidForm'].Select1.options[0] =new Option('Please SELECT your report type from above','None')
document.forms['ValidForm'].Select1.options[0].selected;
}
</SCRIPT>
</head>
<BODY>
<div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<div id="login-box">
<FORM id=Form2 name=ValidForm><font face=Calibri></font>
<H2><font face=Calibri>QUICK REPORT FINDER : </font></H2><br>
<input id="RadioEQ" type="radio" name="assetClass" onclick="getPMAFunds()" onchange="getPMAFunds();" size="15px"/>EQUITY
<input id="RadioFI" type="radio" name="assetClass" onclick="getPMAFunds()" onchange="getPMAFunds();" size="15px"/>FIXED INCOME
<input id="RadioMA" type="radio" name="assetClass" onclick="getPMAFunds()" onchange="getPMAFunds();" size="15px"/>MULTI ASSET
<hr></hr>
<input id="Radio1" type="radio" name="reportype" onclick="getPMAFunds();" onchange="getPMAFunds();" size="15px" />ATTRIBUTION
<input id="Radio2" type="radio" name="reportype" onclick="getPeerRanking()" onchange="getPMAFunds();" /> PEER RANKING
<input id="Radio3" type="radio" name="reportype" onclick="getPMAFunds();" onchange="getPMAFunds();" />CHARACTERISTICS
<input id="RadioGIPS" type="radio" name="reportype" onclick="getGIPSReports()" onchange="getGIPSReports();" size="15px"/>GIPS<br></br>
<H5><font face=Calibri>SELECT COUNTRY:
<SELECT id=SelectCountry name=SelectCountry style="WIDTH: 330px" onchange="getPMAFunds();" ><Option selected></Option>
</SELECT></font></H5>
<H5><font face=Calibri>SELECT FUND:
<SELECT id=Select1 name=Select1 style="WIDTH: 330px" ><Option selected></Option>
</SELECT></font></H5>
<H5><font face=Calibri>SELECT PERIOD: </font>
<SELECT id=Select2 name=Select2>
</SELECT>
<SELECT id=Select3 name=Select3>
</SELECT><font face=Calibri> </font><INPUT NAME="Submit3" TYPE="button" VALUE="Submit" onclick="displayReport();" ID="Button3"></input></H5>
</FORM></div></div>
<div></div>
<div></div>
<div id="Report_Name_Retrieved"></div>
</BODY></html>
No comments:
Post a Comment