I have a page with a select box that offers 3 choices. Based on the user's choice, I want to rewrite the current page with a document.write statement. Is this possible? My code with the error line highlighted is below. Thanks alot!!!!
if (searchBy == "Address" {
var 2ndStageContent
2ndStageContent = ("<html><center><font size='2'>I want to search by: </font></td>"
2ndStageContent += <select size='1' name='SearchDistanceList'>"
2ndStageContent += ("<script language=javascript>"
2ndStageContent += ("var searchCriteria = new Array(1);"
2ndStageContent += ("searchCriteria[0] = '5 minute walk (1/2 mile)';"
2ndStageContent += ("searchCriteria[1] = '10 minute walk (3/4 mile)';"
2ndStageContent += ("for (var i = 0; i <= 2; i++) {"
2ndStageContent += ("document.write ('<option value=' +searchCriteria + '>' + searchCriteria);"
******** THE NEXT LINE IS THE PROBLEM **************
2ndStageContent += ("</script>"
***************************************************
2ndStageContent += ("}"
document.write(2ndStageContent);
}
[sig][/sig]
if (searchBy == "Address" {
var 2ndStageContent
2ndStageContent = ("<html><center><font size='2'>I want to search by: </font></td>"
2ndStageContent += <select size='1' name='SearchDistanceList'>"
2ndStageContent += ("<script language=javascript>"
2ndStageContent += ("var searchCriteria = new Array(1);"
2ndStageContent += ("searchCriteria[0] = '5 minute walk (1/2 mile)';"
2ndStageContent += ("searchCriteria[1] = '10 minute walk (3/4 mile)';"
2ndStageContent += ("for (var i = 0; i <= 2; i++) {"
2ndStageContent += ("document.write ('<option value=' +searchCriteria + '>' + searchCriteria);"
******** THE NEXT LINE IS THE PROBLEM **************
2ndStageContent += ("</script>"
***************************************************
2ndStageContent += ("}"
document.write(2ndStageContent);
}
[sig][/sig]