zonome
05-01-2003, 05:03 AM
I have a web page where the user can select values from a drop down list. Then depending on what they select I submit the form and display a table to them. The table itself contains another drop down list that allows the user to select from a list of values. Once again depending on what they choose from the second list the form gets submitted and they are presented with another table. The problem I am having is that the second time I submit the form it seems that the value the user selected from the first drop down list is lost and instead replace by the last item on the list from the first drop down. How do I remember the value the user has selected from the first drop down box so that it is not lost when the form is submitted the second time?
Here are my Java Script functions...I can not submit more than this as the message will get too long
function submitSelectedCurrency(){
var currencyListLength = document.curveSourceForm.CurrencyList.length
for (var i = 0; i < currencyListLength;i++){
if ( document.curveSourceForm.CurrencyList.options[i].selected == true){
document.curveSourceForm.userSelectedCurrency.value = document.curveSourceForm.CurrencyList.options[i].text;
document.curveSourceForm.userSelectedBook.value = document.curveSourceForm.BookList.options[document.curveSourceForm.BookList.selectedIndex].text;
}
}
document.curveSourceForm.submit();
}
function submitSelectedCurveSource(){
var currencyListLength = document.curveSourceForm.CurrencyList.length
for (var i = 0; i < currencyListLength;i++){
document.curveSourceForm.userSelectedSource.value = document.curveSourceForm.CurveSourceList.options[document.curveSourceForm.CurveSourceList.selectedIndex].text;
document.curveSourceForm.displayedAlready.value = "yes"
document.curveSourceForm.userSelectedBook.value = document.curveSourceForm.BookList.options[document.curveSourceForm.BookList.selectedIndex].text;
document.curveSourceForm.userSelectedCurrency.value = document.curveSourceForm.CurrencyList.options[i].text;
}
document.curveSourceForm.submit();
}
function callServlet(){
document.curveSourceForm.action="/priceEngineReport/curveSource/curveSourceConfig";
for (var i = 0; i < currencyListLength;i++){
document.curveSourceForm.userSelectedSource.value = document.curveSourceForm.CurveSourceList.options[document.curveSourceForm.CurveSourceList.selectedIndex].text;
document.curveSourceForm.userSelectedBook.value = document.curveSourceForm.BookList.options[document.curveSourceForm.BookList.selectedIndex].text;
document.curveSourceForm.userSelectedCurrency.value = document.curveSourceForm.CurrencyList.options[i].text;
}
document.curveSourceForm.submit();
}
Here are my Java Script functions...I can not submit more than this as the message will get too long
function submitSelectedCurrency(){
var currencyListLength = document.curveSourceForm.CurrencyList.length
for (var i = 0; i < currencyListLength;i++){
if ( document.curveSourceForm.CurrencyList.options[i].selected == true){
document.curveSourceForm.userSelectedCurrency.value = document.curveSourceForm.CurrencyList.options[i].text;
document.curveSourceForm.userSelectedBook.value = document.curveSourceForm.BookList.options[document.curveSourceForm.BookList.selectedIndex].text;
}
}
document.curveSourceForm.submit();
}
function submitSelectedCurveSource(){
var currencyListLength = document.curveSourceForm.CurrencyList.length
for (var i = 0; i < currencyListLength;i++){
document.curveSourceForm.userSelectedSource.value = document.curveSourceForm.CurveSourceList.options[document.curveSourceForm.CurveSourceList.selectedIndex].text;
document.curveSourceForm.displayedAlready.value = "yes"
document.curveSourceForm.userSelectedBook.value = document.curveSourceForm.BookList.options[document.curveSourceForm.BookList.selectedIndex].text;
document.curveSourceForm.userSelectedCurrency.value = document.curveSourceForm.CurrencyList.options[i].text;
}
document.curveSourceForm.submit();
}
function callServlet(){
document.curveSourceForm.action="/priceEngineReport/curveSource/curveSourceConfig";
for (var i = 0; i < currencyListLength;i++){
document.curveSourceForm.userSelectedSource.value = document.curveSourceForm.CurveSourceList.options[document.curveSourceForm.CurveSourceList.selectedIndex].text;
document.curveSourceForm.userSelectedBook.value = document.curveSourceForm.BookList.options[document.curveSourceForm.BookList.selectedIndex].text;
document.curveSourceForm.userSelectedCurrency.value = document.curveSourceForm.CurrencyList.options[i].text;
}
document.curveSourceForm.submit();
}