Hello,
I am trying to design a web form, whenever I try to run the form I am getting Microsoft Vb Script error.I am using asp and an SQL Server 2005 database.
"I was trying to retrieve data from the database into the dropdown list, I am not sure whether I am doing the right way or not "
If any one can help it will be greatly appreciated.
Microsoft VBScript compilation error '800a03fa'
Expected 'Wend'
Thank you
<%@ LANGUAGE="VBScript" %>
<%
Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>
HelpDesk NewProblem
var strAlertMsg = ""
var focusField = ""
//Validate Text Box
function isEmpty(theForm,strFieldName,strMsg){
var objFormField = theForm.elements[strFieldName];
var strValue = objFormField.value;
strValue = strValue.split(" ").join("")
if(strValue.length<1){
strAlertMsg += "- "+ strMsg +" is Required.\n";
if(!focusField) focusField =""+ strFieldName +"";
return false;
}
return true;
}
//==========================================================================
//Validate the Select
function hasSelection(theForm,strFieldName,strMsg) {
var objFormField = theForm.elements[strFieldName];
if(objFormField.selectedIndex ==0) {
strAlertMsg += "- "+ strMsg +" is Required.\n";
if(!focusField) focusField =""+ strFieldName +"";
return false;
}
return true;
}
//========================================================================
//Begin Page Validation
function validateForm(theForm){
strAlertMsg = ""
focusField = ""
hasSelection(theForm,'select1','departmentname')
isEmpty(theForm,'txtBox','NH')
isEmpty(theForm,'txtBox1','SSN')
isEmpty(theForm,'txtBox5','problemTitle')
isEmpty(theForm,'txtBox6','problemDescription')
if(strAlertMsg !=""){
alert("Please correct the following errors:\n____________________________\n\n" + strAlertMsg);
eval("theForm." + focusField + ".focus()");
return false;
}
return true;
}
function enableDefault() {
document.getElementById('representativeSSN').disabled = false;
document.getElementById('organizationName').disabled = false;
document.getElementById('representativeZipCode').disabled = false;
document.getElementById('txtCustomMessage').disabled = true;
}
function enableCustom() {
document.getElementById('representativeSSN').disabled = true;
document.getElementById('organizationName').disabled = true;
document.getElementById('representativeZipCode').disabled = true;
document.getElementById('txtCustomMessage').disabled = false;
}
/**/
//========================================================================
#imageUpload input {
display: block;
}
//this script to upload files
function fileFields() {
var x = document.getElementById('imageUpload');
x.onclick = function() {
var i = parseFloat(this.lastChild.id)+1;
input = document.createElement("input");
input.setAttribute("type", "file");
input.setAttribute("name", 'imageName_' + i);
input.setAttribute("id", i);
this.appendChild(input);
}
}
* - Required
|
| Contact Form for SOST |
| Tell us how to get in touch with you |
| UserName: |
* |
| EMail: |
* |
| Location: |
*
|
| Phone: |
*
|
|
Information
|
|
Department:
|
<%
Dim rst
set rst=cnn.Execute ("SELECT * From Departments WHERE DepartmentID > 1 ORDER BY DepartmentName ASC")
if(rst.eof) then
Response.Write("Sorry.... there is no such information ")
rst.Close()
end if
while not rst.eof
%>
" selected>
<% = rst("DepartmentName") %>
* |
|
NH
|
* |
|
SSN:
|
* |
|
Attachments:
|
|
|
| |
IsRepresentativePayeeInvolved? *
|
| Yes:
No:
|
| Reppayeessn: |
* |
| ZipCode: |
* |
| orgainizationname: |
*
|
What kind of issue do you have?:
* |
|
Problem/Question |
Comment |
Subject
*
Enter your question or issue below: :
*
|
|
Add New Comment