I am working with a web page where a user enters in information into a form. When the user enters the page it does a recordset.addrecord. The user has to type in some information and then there is a spot where based on what the user selects in a Listbox it shows them more information that they need to fill in. When they choose something in the listbox I fire the onchange command to figure out if they selected X or Y. When the user is all done typing in all the information they hit a submit button and it does a recordset.updaterecord.
When my page fires the onchange event it puts the data into the first line of the table and overrides the previously stored information that was in that line. Is there a way I can do this and add the record instead of overriding a record?
Here is some of my code to help explain a little bit more to what I'm trying to accomplish.
<SCRIPT RUNAT=Server LANGUAGE=JavaScript>
function thisPage_onenter() {
if (thisPage.firstEntered)
{
Recordset1.addRecord();
}
}
</script>
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>
Sub btnSubmit_onclick()
txtDomeType.value = LstDomeType.getValue( LstDomeType.selectedIndex)
Recordset1.updateRecord
Response.Redirect ("MainMenu.asp"
End Sub
Sub LstType_onchange()
txtType.value = LstType.getValue (LstType.selectedIndex)
if txtType.value = "Flat" then
LstFlat.show
LblFlat.show
else
do something else
end if
end sub
</script>
Thanks in advance.
When my page fires the onchange event it puts the data into the first line of the table and overrides the previously stored information that was in that line. Is there a way I can do this and add the record instead of overriding a record?
Here is some of my code to help explain a little bit more to what I'm trying to accomplish.
<SCRIPT RUNAT=Server LANGUAGE=JavaScript>
function thisPage_onenter() {
if (thisPage.firstEntered)
{
Recordset1.addRecord();
}
}
</script>
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>
Sub btnSubmit_onclick()
txtDomeType.value = LstDomeType.getValue( LstDomeType.selectedIndex)
Recordset1.updateRecord
Response.Redirect ("MainMenu.asp"
End Sub
Sub LstType_onchange()
txtType.value = LstType.getValue (LstType.selectedIndex)
if txtType.value = "Flat" then
LstFlat.show
LblFlat.show
else
do something else
end if
end sub
</script>
Thanks in advance.