mrmookster
Programmer
i've reached the limit of my javascript knowledge can you help?
i have a form that builds a number of select boxes (it may be different per page) i need a javascript form validator to go through each select in the form and verify that a selection has been made ie selectedIndex !=0
the pseudocode would be
function validateForm
errorStr = ""
for each select in form
if select.selectedIndex != 0 then
errorStr = errorStr + select.selectedIndex.text
next
if errorStr <> "" then alert(errorStr)
return false
else return true
end function
i have a form that builds a number of select boxes (it may be different per page) i need a javascript form validator to go through each select in the form and verify that a selection has been made ie selectedIndex !=0
the pseudocode would be
function validateForm
errorStr = ""
for each select in form
if select.selectedIndex != 0 then
errorStr = errorStr + select.selectedIndex.text
next
if errorStr <> "" then alert(errorStr)
return false
else return true
end function