Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script works in IE6 but not in IE7

Status
Not open for further replies.

tilmant

IS-IT--Management
Jul 11, 2001
10
US
I was given this code to look at and I cannot figure out while it works in IE6 and not in IE7. The code is executed by a program called GadWIN which takes a screen shot and submits it to the VBS. The VBS creates a web form which is populated by AD. Once you submit the form by clicking on the submit button, the screenshot is attached to an email and sent to our helpdesk system. The VBS executes draws the web form and populates it. But one you click on the submit nothing happens. I'm not a VBS expert, so the best I can tell is that it it has to do with the section of the code below. Any ideas what I'm doing wrong.
' *****************************************************************
' * Function IncidentInfo
' * Displays Webform and collects information
' *****************************************************************
Sub IncidentInfo()
Dim oIE ' declare variables

' *** launch Internet Explorer ***
Set oIE = WScript.CreateObject("InternetExplorer.Application")
oIE.Left= 0 ' window position
oIE.top = 0 ' and other properties
oIE.height = 665
oIE.width = 665
oIE.menubar = 0 ' no menu
oIE.toolbar = 0
oIE.statusbar = 0
oIE.navigate strTempCaptureDir & "\IncidentInfo.htm" ' Form
oIE.visible = 1 ' keep visible

' Important: wait till MSIE is ready
Do Until oIE.ReadyState = 4 : WScript.Sleep 100 : Loop
oIE.Document.title = strIETitle
With CreateObject("WScript.Shell")
Do until .AppActivate(strIETitle & " - M") : WScript.Sleep 10: Loop
End With

' Wait till the user clicks the OK button
' Use the CheckVal function
' Attention: Thanks to a note from M. Harris, we can make
' the script a bit more fool proof. We need to catch the case
' that the user closes the form without clicking the OK button.
On Error Resume Next ' switch error handling on
Do ' Wait till OK button is clicked
Loop While (oIE.document.script.CheckVal()=0)
If err <> 0 Then
For Each f1 In fc
If Left(f1.name, strcount) = strScreenShotname Then
objFSO.DeleteFile(strTempCaptureDir & "\" & f1.name)
End If
Next
WScript.Quit ' end script
End If
On Error Goto 0 ' switch error handling off
msgbox "Waiting on OK"
If oIE.document.script.CheckVal() = 1 Then ' User has clicked the OK button, retrieve the values
msgbox "Has click Submit"
item = 0
For Each FormData In oIE.Document.ValidForm
ReDim Preserve arrFormData(item)
If Left(FormData.Name, strcount) = strScreenShotname Then
If FormData.Checked Then arrFormData(item) = FormData.Value
Else
If Left(FormData.Name,4) = "chbx" Then
If FormData.Checked Then arrFormData(item) = FormData.Value
Else
arrFormData(item) = FormData.Value
End If
End If
'MsgBox FormData.Value
item = item + 1
Next
oIE.Quit ' close Internet Explorer
Set oIE = Nothing ' reset object variable
Else
If oIE.Document.ValidForm.DeleteScreenShots.Checked Then
For Each f1 In fc
If Left(f1.name, strcount) = strScreenShotname Then
objFSO.DeleteFile(strTempCaptureDir & "\" & f1.name)
End If
Next
End If
oIE.Quit ' close Internet Explorer
Set oIE = Nothing ' reset object variable
WScript.Quit
End If
On Error Goto 0 ' switch error handling off
End Sub


' *****************************************************************
' * Function Writepage
' * Write out the webform
' *****************************************************************
Sub WritePage(strTempCaptureDir, strUserName, strlocation, strcomptername, strDate, strTitleofform, strSubTitleofform, strCategorydefault)
Dim objTextFile
Set objTextFile = objFSO.CreateTextFile(strTempCaptureDir& "\IncidentInfo.htm", True)

objTextFile.WriteLine("<html>")
objTextFile.WriteLine(" <head>")
objTextFile.WriteLine(" <meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">")
objTextFile.WriteLine(" <title>" & strTitleofform & "</title>")
objTextFile.WriteLine(" <script language=""JavaScript"">")
objTextFile.WriteLine(" <!--")
objTextFile.WriteLine(" var group = new Array(6);")
objTextFile.WriteLine(" var group2 = new Array(6);")
objTextFile.WriteLine(" for (i = 0; i < 7; i++) group = new Array();")
objTextFile.WriteLine(" for (k = 0; k < 7; k++) group2[k] = new Array();")
objTextFile.WriteLine(" group[0][0] = new Option('n/a','n/a');")
objTextFile.WriteLine(" group[1][0] = new Option('Select a program','Select one');")
objTextFile.WriteLine(" group[1][1] = new Option('AAP','AAP');")
objTextFile.WriteLine(" group[1][2] = new Option('CAPI','CAPI');")
objTextFile.WriteLine(" group[1][3] = new Option('CalWORKs','CalWORKs');")
objTextFile.WriteLine(" group[1][4] = new Option('WTW','WTW');")
objTextFile.WriteLine(" group[1][5] = new Option('Foster Care','Foster Care');")
objTextFile.WriteLine(" group[1][6] = new Option('Food Stamps','Food Stamps');")
objTextFile.WriteLine(" group[1][7] = new Option('General Assistance','General Assistance');")
objTextFile.WriteLine(" group[1][8] = new Option('IHSS','IHSS');")
objTextFile.WriteLine(" group[1][9] = new Option('MediCal','MediCal');")
objTextFile.WriteLine(" group[1][10] = new Option('KinGAP','KinGAP');")
objTextFile.WriteLine(" group[2][0] = new Option('Select a program','Select one');")
objTextFile.WriteLine(" group[2][1] = new Option('AAP','AAP');")
objTextFile.WriteLine(" group[2][2] = new Option('CAPI','CAPI');")
objTextFile.WriteLine(" group[2][3] = new Option('CalWORKs','CalWORKs');")
objTextFile.WriteLine(" group[2][4] = new Option('WTW','WTW');")
objTextFile.WriteLine(" group[2][5] = new Option('Foster Care','Foster Care');")
objTextFile.WriteLine(" group[2][6] = new Option('Food Stamps','Food Stamps');")
objTextFile.WriteLine(" group[2][7] = new Option('General Assistance','General Assistance');")
objTextFile.WriteLine(" group[2][8] = new Option('IHSS','IHSS');")
objTextFile.WriteLine(" group[2][9] = new Option('MediCal','MediCal');")
objTextFile.WriteLine(" group[2][10] = new Option('KinGAP','KinGAP');")
objTextFile.WriteLine(" group[3][0] = new Option('Select a program','Select one');")
objTextFile.WriteLine(" group[3][1] = new Option('AAP','AAP');")
objTextFile.WriteLine(" group[3][2] = new Option('CAPI','CAPI');")
objTextFile.WriteLine(" group[3][3] = new Option('CalWORKs','CalWORKs');")
objTextFile.WriteLine(" group[3][4] = new Option('WTW','WTW');")
objTextFile.WriteLine(" group[3][5] = new Option('Foster Care','Foster Care');")
objTextFile.WriteLine(" group[3][6] = new Option('Food Stamps','Food Stamps');")
objTextFile.WriteLine(" group[3][7] = new Option('General Assistance','General Assistance');")
objTextFile.WriteLine(" group[3][8] = new Option('IHSS','IHSS');")
objTextFile.WriteLine(" group[3][9] = new Option('MediCal','MediCal');")
objTextFile.WriteLine(" group[3][10] = new Option('KinGAP','KinGAP');")
objTextFile.WriteLine(" group[4][0] = new Option('Select Problem Area','Select problem');")
objTextFile.WriteLine(" group[4][1] = new Option('RACF Logon Problem','RACF Logon Problem');")
objTextFile.WriteLine(" group[4][2] = new Option('Lift SSN-VER Code for SSN Correction','SSN-VER Code SSN Correction');")
objTextFile.WriteLine(" group[4][3] = new Option('Lift SSN-VER Code for DOB Correction','SSN-VER Code DOB Correction');")
objTextFile.WriteLine(" group[4][4] = new Option('Release SSN','Release SSN');")
objTextFile.WriteLine(" group[4][5] = new Option('Remove Death Code','Remove Death Code');")
objTextFile.WriteLine(" group[4][6] = new Option('Change Death Date','Change Death Date');")
objTextFile.WriteLine(" group[4][7] = new Option('CIN Problem','CIN Problem');")
objTextFile.WriteLine(" group[4][8] = new Option('Person number Problem','Person number Problem');")
objTextFile.WriteLine(" group[4][9] = new Option('Cross Reference Problem','Cross Reference Problem');")
objTextFile.WriteLine(" group[4][10] = new Option('Remove Restriction Code','Remove Restriction Code');")
objTextFile.WriteLine(" group[4][11] = new Option('Terminate Record','Terminate Record');")
objTextFile.WriteLine(" group[4][12] = new Option('Duplicate Record Problem (EW11 Review)','Duplicate Record');")
objTextFile.WriteLine(" group[4][13] = new Option('Other','Other');")
objTextFile.WriteLine(" group[5][0] = new Option('','');")
objTextFile.WriteLine(" group[6][0] = new Option('','');")
objTextFile.WriteLine(" group2[0][0] = new Option('n/a','n/a');")
objTextFile.WriteLine(" group2[1][0] = new Option('Select a subsystem','Select one');")
objTextFile.WriteLine(" group2[1][1] = new Option('Alerts','Alerts');")
objTextFile.WriteLine(" group2[1][2] = new Option('Answers','Answers');")
objTextFile.WriteLine(" group2[1][3] = new Option('Application Registration','App Register');")
objTextFile.WriteLine(" group2[1][4] = new Option('Appointment Scheduling','Appt Sched');")
objTextFile.WriteLine(" group2[1][5] = new Option('Authorization','Autho');")
objTextFile.WriteLine(" group2[1][6] = new Option('Benefit Issuance','Benefit Iss');")
objTextFile.WriteLine(" group2[1][7] = new Option('Benefit Recovery','Benefit Rec');")
objTextFile.WriteLine(" group2[1][8] = new Option('Case Assignment','Case Assign');")
objTextFile.WriteLine(" group2[1][9] = new Option('Client Correspondence','Client Corr');")
objTextFile.WriteLine(" group2[1][10] = new Option('Client Referral','Client Ref');")
objTextFile.WriteLine(" group2[1][11] = new Option('Conversion','Conversion');")
objTextFile.WriteLine(" group2[1][12] = new Option('County MACD','County MACD');")
objTextFile.WriteLine(" group2[1][13] = new Option('County Special Requests','County Special Requests');")
objTextFile.WriteLine(" group2[1][14] = new Option('Data Collection','Data Coll');")
objTextFile.WriteLine(" group2[1][15] = new Option('EDBC','EDBC');")
objTextFile.WriteLine(" group2[1][16] = new Option('Employment Services','Employ Ser');")
objTextFile.WriteLine(" group2[1][17] = new Option('Error Prone','Error Prone');")
objTextFile.WriteLine(" group2[1][18] = new Option('General Systems','General Systems');")
objTextFile.WriteLine(" group2[1][19] = new Option('Hearings','Hearings');")
objTextFile.WriteLine(" group2[1][20] = new Option('History Maintenance','Hist Maint');")
objTextFile.WriteLine(" group2[1][21] = new Option('Index Clearance','Index Clear');")
objTextFile.WriteLine(" group2[1][22] = new Option('Inquiry','Inquiry');")
objTextFile.WriteLine(" group2[1][23] = new Option('Interfaces','Interfaces');")
objTextFile.WriteLine(" group2[1][24] = new Option('Management Reporting','Mgmt Rep');")
objTextFile.WriteLine(" group2[1][25] = new Option('Mass Updates','Mass Upd');")
objTextFile.WriteLine(" group2[1][26] = new Option('Periodic Reporting','Per Rptg');")
objTextFile.WriteLine(" group2[1][27] = new Option('Print Problem','Print');")
objTextFile.WriteLine(" group2[1][28] = new Option('Provider/Program Maintenance','Provider/Program Maint');")
objTextFile.WriteLine(" group2[1][29] = new Option('Quality Control ','Qual Cntrl');")
objTextFile.WriteLine(" group2[1][30] = new Option('Redetermination','Redeterm');")
objTextFile.WriteLine(" group2[1][31] = new Option('Reference Tables','Ref Tables');")
objTextFile.WriteLine(" group2[1][32] = new Option('Access/Security','Security');")
objTextFile.WriteLine(" group2[1][33] = new Option('Traffic Log','Traf Log');")
objTextFile.WriteLine(" group2[1][34] = new Option('Wrap Up','Wrap Up');")
objTextFile.WriteLine(" group2[1][35] = new Option('Other','Other');")
objTextFile.WriteLine(" group2[2][0] = new Option('Select a subsystem','Select one');")
objTextFile.WriteLine(" group2[2][1] = new Option('Alerts','Alerts');")
objTextFile.WriteLine(" group2[2][2] = new Option('Answers','Answers');")
objTextFile.WriteLine(" group2[2][3] = new Option('Application Registration','App Register');")
objTextFile.WriteLine(" group2[2][4] = new Option('Appointment Scheduling','Appt Sched');")
objTextFile.WriteLine(" group2[2][5] = new Option('Authorization','Autho');")
objTextFile.WriteLine(" group2[2][6] = new Option('Benefit Issuance','Benefit Iss');")
objTextFile.WriteLine(" group2[2][7] = new Option('Benefit Recovery','Benefit Rec');")
objTextFile.WriteLine(" group2[2][8] = new Option('Case Assignment','Case Assign');")
objTextFile.WriteLine(" group2[2][9] = new Option('Client Correspondence','Client Corr');")
objTextFile.WriteLine(" group2[2][10] = new Option('Client Referral','Client Ref');")
objTextFile.WriteLine(" group2[2][11] = new Option('Conversion','Conversion');")
objTextFile.WriteLine(" group2[2][12] = new Option('County MACD','County MACD');")
objTextFile.WriteLine(" group2[2][13] = new Option('County Special Requests','County Special Requests');")
objTextFile.WriteLine(" group2[2][14] = new Option('Data Collection','Data Coll');")
objTextFile.WriteLine(" group2[2][15] = new Option('EDBC','EDBC');")
objTextFile.WriteLine(" group2[2][16] = new Option('Employment Services','Employ Ser');")
objTextFile.WriteLine(" group2[2][17] = new Option('Error Prone','Error Prone');")
objTextFile.WriteLine(" group2[2][18] = new Option('General Systems','General Systems');")
objTextFile.WriteLine(" group2[2][19] = new Option('Hearings','Hearings');")
objTextFile.WriteLine(" group2[2][20] = new Option('History Maintenance','Hist Maint');")
objTextFile.WriteLine(" group2[2][21] = new Option('Index Clearance','Index Clear');")
objTextFile.WriteLine(" group2[2][22] = new Option('Inquiry','Inquiry');")
objTextFile.WriteLine(" group2[2][23] = new Option('Interfaces','Interfaces');")
objTextFile.WriteLine(" group2[2][24] = new Option('Management Reporting','Mgmt Rep');")
objTextFile.WriteLine(" group2[2][25] = new Option('Mass Updates','Mass Upd');")
objTextFile.WriteLine(" group2[2][26] = new Option('Periodic Reporting','Per Rptg');")
objTextFile.WriteLine(" group2[2][27] = new Option('Print Problem','Print');")
objTextFile.WriteLine(" group2[2][28] = new Option('Provider/Program Maintenance','Provider/Program Maint');")
objTextFile.WriteLine(" group2[2][29] = new Option('Quality Control ','Qual Cntrl');")
objTextFile.WriteLine(" group2[2][30] = new Option('Redetermination','Redeterm');")
objTextFile.WriteLine(" group2[2][31] = new Option('Reference Tables','Ref Tables');")
objTextFile.WriteLine(" group2[2][32] = new Option('Access/Security','Security');")
objTextFile.WriteLine(" group2[2][33] = new Option('Traffic Log','Traf Log');")
objTextFile.WriteLine(" group2[2][34] = new Option('Wrap Up','Wrap Up');")
objTextFile.WriteLine(" group2[2][35] = new Option('Other','Other');")
objTextFile.WriteLine(" group2[3][0] = new Option('Select a subsystem','Select one');")
objTextFile.WriteLine(" group2[3][1] = new Option('Alerts','Alerts');")
objTextFile.WriteLine(" group2[3][2] = new Option('Answers','Answers');")
objTextFile.WriteLine(" group2[3][3] = new Option('Application Registration','App Register');")
objTextFile.WriteLine(" group2[3][4] = new Option('Appointment Scheduling','Appt Sched');")
objTextFile.WriteLine(" group2[3][5] = new Option('Authorization','Autho');")
objTextFile.WriteLine(" group2[3][6] = new Option('Benefit Issuance','Benefit Iss');")
objTextFile.WriteLine(" group2[3][7] = new Option('Benefit Recovery','Benefit Rec');")
objTextFile.WriteLine(" group2[3][8] = new Option('Case Assignment','Case Assign');")
objTextFile.WriteLine(" group2[3][9] = new Option('Client Correspondence','Client Corr');")
objTextFile.WriteLine(" group2[3][10] = new Option('Client Referral','Client Ref');")
objTextFile.WriteLine(" group2[3][11] = new Option('Conversion','Conversion');")
objTextFile.WriteLine(" group2[3][12] = new Option('County MACD','County MACD');")
objTextFile.WriteLine(" group2[3][13] = new Option('County Special Requests','County Special Requests');")
objTextFile.WriteLine(" group2[3][14] = new Option('Data Collection','Data Coll');")
objTextFile.WriteLine(" group2[3][15] = new Option('EDBC','EDBC');")
objTextFile.WriteLine(" group2[3][16] = new Option('Employment Services','Employ Ser');")
objTextFile.WriteLine(" group2[3][17] = new Option('Error Prone','Error Prone');")
objTextFile.WriteLine(" group2[3][18] = new Option('General Systems','General Systems');")
objTextFile.WriteLine(" group2[3][19] = new Option('Hearings','Hearings');")
objTextFile.WriteLine(" group2[3][20] = new Option('History Maintenance','Hist Maint');")
objTextFile.WriteLine(" group2[3][21] = new Option('Index Clearance','Index Clear');")
objTextFile.WriteLine(" group2[3][22] = new Option('Inquiry','Inquiry');")
objTextFile.WriteLine(" group2[3][23] = new Option('Interfaces','Interfaces');")
objTextFile.WriteLine(" group2[3][24] = new Option('Management Reporting','Mgmt Rep');")
objTextFile.WriteLine(" group2[3][25] = new Option('Mass Updates','Mass Upd');")
objTextFile.WriteLine(" group2[3][26] = new Option('Periodic Reporting','Per Rptg');")
objTextFile.WriteLine(" group2[3][27] = new Option('Print Problem','Print');")
objTextFile.WriteLine(" group2[3][28] = new Option('Provider/Program Maintenance','Provider/Program Maint');")
objTextFile.WriteLine(" group2[3][29] = new Option('Quality Control ','Qual Cntrl');")
objTextFile.WriteLine(" group2[3][30] = new Option('Redetermination','Redeterm');")
objTextFile.WriteLine(" group2[3][31] = new Option('Reference Tables','Ref Tables');")
objTextFile.WriteLine(" group2[3][32] = new Option('Access/Security','Security');")
objTextFile.WriteLine(" group2[3][33] = new Option('Traffic Log','Traf Log');")
objTextFile.WriteLine(" group2[3][34] = new Option('Wrap Up','Wrap Up');")
objTextFile.WriteLine(" group2[3][35] = new Option('Other','Other');")
objTextFile.WriteLine(" group2[4][0] = new Option('','');")
objTextFile.WriteLine(" group2[5][0] = new Option('','');")
objTextFile.WriteLine(" group2[6][0] = new Option('','');")
objTextFile.WriteLine(" '-->")
objTextFile.WriteLine(" </script>")
objTextFile.WriteLine(" <script language=""JavaScript"">")
objTextFile.WriteLine(" <!-- Begin")
objTextFile.WriteLine(" var cntdwn = 800;")
objTextFile.WriteLine(" function validCheckBox(formField)")
objTextFile.WriteLine(" { var result = true;")
objTextFile.WriteLine(" if (formField.checked == false)")
objTextFile.WriteLine(" {result = false;}")
objTextFile.WriteLine(" return result;}")
objTextFile.WriteLine(" function validPhonetextbox(formField, alerttext)")
objTextFile.WriteLine(" { var result = true;")
objTextFile.WriteLine(" if (formField.value == '')")
objTextFile.WriteLine(" {alert(alerttext);")
objTextFile.WriteLine(" formField.focus();")
objTextFile.WriteLine(" result = false;}")
objTextFile.WriteLine(" return result;}")
objTextFile.WriteLine(" function textCounter(field,cntfield,rlem1,rlem2,rlem3) {")
objTextFile.WriteLine(" rlem1.value = field.value.length;")
objTextFile.WriteLine(" cntcheck = cntdwn - rlem1.value - rlem2.value - rlem3.value ;")
objTextFile.WriteLine(" if (cntcheck > cntfield.value) {cntfield.value = cntfield.value + 1;}")
objTextFile.WriteLine(" maxlimit = cntdwn - rlem2.value - rlem3.value ;")
objTextFile.WriteLine(" if (cntfield.value <= 0) {")
objTextFile.WriteLine(" field.value = field.value.substring(0, maxlimit);")
objTextFile.WriteLine(" rlem1.value = rlem1.value - 1;")
objTextFile.WriteLine(" cntfield.value = 0;}")
objTextFile.WriteLine(" else {")
objTextFile.WriteLine(" cntfield.value = cntdwn - rlem1.value - rlem2.value - rlem3.value ;}")
objTextFile.WriteLine(" }")
objTextFile.WriteLine(" function validCategory(formField,fieldvalue,fieldLabel)")
objTextFile.WriteLine(" { var result = true;")
objTextFile.WriteLine(" if (formField.value == fieldvalue)")
objTextFile.WriteLine(" {alert('Please select a ' + fieldLabel + '.');")
objTextFile.WriteLine(" formField.focus();")
objTextFile.WriteLine(" result = false;}")
objTextFile.WriteLine(" return result;}")
objTextFile.WriteLine(" function validtextbox(formField, Category, alerttext, catvalue, varcount)")
objTextFile.WriteLine(" { var result = true;")
objTextFile.WriteLine(" var tempvalue = String(Category.value).substring(0,varcount);")
objTextFile.WriteLine(" if (tempvalue == catvalue){")
objTextFile.WriteLine(" if (formField.value == '')")
objTextFile.WriteLine(" {alert(alerttext);")
objTextFile.WriteLine(" formField.focus();")
objTextFile.WriteLine(" result = false;}}")
objTextFile.WriteLine(" return result;}")
objTextFile.WriteLine(" function validateForm(theForm)")
objTextFile.WriteLine(" {")
objTextFile.WriteLine(" if (!validCategory(theForm.mainCats,""Main Categories"",""main category"", true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validPhonetextbox(theForm.Phone,""Please enter a phone number where we can reach you"", true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validPhonetextbox(theForm.Sensitive,""Please enter a reason for making this sensitive"", true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validPhonetextbox(theForm.tryingtodo,""What were you trying to do?"", true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validPhonetextbox(theForm.systemresponse,""What was the System Response?"", true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validPhonetextbox(theForm.sameproblem,""Did anyone else have the same problem?"", true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validCategory(theForm.subCats,""Select one"",""program"",true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validCategory(theForm.subCats,""Select problem"",""problem area"",true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validCategory(theForm.subCats2,""Select one"",""subsystem"",true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validCategory(theForm.subCats,""Select Problem Area"",""problem area"",true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validtextbox(theForm.caseinputbx,theForm.mainCats,""Please enter CalWIN Case Number or NA if not available."",""CalWIN"",6, true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validtextbox(theForm.caseinputbx,theForm.mainCats,""Please enter CalWIN Case Number or NA if not available."",""MEDS"",4, true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validtextbox(theForm.calwinerrorbx,theForm.mainCats,""Please enter CalWIN Error Code or NA if not available."",""CalWIN"",6, true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validtextbox(theForm.noacc,theForm.subCats2,""Please enter Client Correspondence/NOA or NA."",""Client Corr"",11, true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validtextbox(theForm.MEDSinputbx,theForm.mainCats,""Please enter SSN/Pseudo# or CIN# or NA if not available."",""MEDS"",4, true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" if (!validtextbox(theForm.MEDSalertbx,theForm.mainCats,""Please enter MEDS ALert Number or NA if not available."",""MEDS"",4, true))")
objTextFile.WriteLine(" return false;")
objTextFile.WriteLine(" return true;}")
objTextFile.WriteLine(" // End -->")
objTextFile.WriteLine(" </script>")
objTextFile.WriteLine("</head>")
objTextFile.WriteLine("<body lang=EN-US style='tab-interval:.5in'>")
objTextFile.WriteLine(" <script language=""VBScript"">")
objTextFile.WriteLine(" <!--")
objTextFile.WriteLine(" Dim ready ")
objTextFile.WriteLine(" Public TheForm ")
objTextFile.WriteLine(" Sub Button1_OnClick")
objTextFile.WriteLine(" ready = 1")
objTextFile.WriteLine(" End Sub")
objTextFile.WriteLine(" Sub Button2_OnClick")
objTextFile.WriteLine(" ready = 2")
objTextFile.WriteLine(" End Sub")
objTextFile.WriteLine(" Sub window_onload()")
objTextFile.WriteLine(" Set TheForm = Document.ValidForm")
'objTextFile.WriteLine(" TheForm.UserName.Value="""&strUserName&""" ")
objTextFile.WriteLine(" TheForm.Date.Value="""&strDate&""" ")
objTextFile.WriteLine(" TheForm.SIN.Value="""&strcomptername&""" ")
objTextFile.WriteLine(" TheForm.Address.Value="""&strlocation&""" ")
objTextFile.WriteLine(" TheForm.Sensitive.Value="""&"No Information"&""" ")
objTextFile.WriteLine(" ready = 0")
objTextFile.WriteLine(" End Sub")
objTextFile.WriteLine(" Public Function CheckVal ()")
objTextFile.WriteLine(" CheckVal = ready")
objTextFile.WriteLine(" End function")
objTextFile.WriteLine(" '-->")
objTextFile.WriteLine(" </script>")
objTextFile.WriteLine(" <table border=""1"" width=600 id=""Main"" bordercolor=#0000FF>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td>")
objTextFile.WriteLine(" <table border=""0"" width=""100%"" id=""Title"">")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td bgcolor=#0000FF>")
objTextFile.WriteLine(" <p align=""center""><b><font size=""6"" color=""#FFFFFF"">" & strTitleofform & "</font></b>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td>")
objTextFile.WriteLine(" <p align=""center""><b><font size=""5"">" & strSubTitleofform & "</font></b>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td>")
objTextFile.WriteLine(" <div align=""center"">")
objTextFile.WriteLine(" <div class=Section1>")
objTextFile.WriteLine(" <form name=""ValidForm"">")
objTextFile.WriteLine(" <table border=""1"" width=""100%"" id=""table1"" bordercolor=#FFFFFF>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td width=10% bordercolor=#0000FF style=""font: x-small"">Name</td>")
objTextFile.WriteLine(" <td width=40% bordercolor=#0000FF><input type=""text"" size=""25"" name=""UserName"" style=""font: x-small""></td>")
objTextFile.WriteLine(" <td width=10% bordercolor=#0000FF style=""font: x-small"">Date: </td>")
objTextFile.WriteLine(" <td width=40% bordercolor=#0000FF><input readonly type=""text"" size=""25"" name=""Date"" style=""font: x-small""></td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td bordercolor=#0000FF style=""font: x-small"">SSATag#:</td>")
objTextFile.WriteLine(" <td bordercolor=#0000FF><input readonly type=""text"" size=""25"" name=""SIN"" style=""font: x-small""></td>")
objTextFile.WriteLine(" <td bordercolor=#0000FF style=""font: x-small"">Location: </td>")
objTextFile.WriteLine(" <td bordercolor=#0000FF><input readonly type=""text"" size=""25"" name=""Address"" style=""font: x-small""></td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td bordercolor=#0000FF style=""font: x-small"">Phone#</td>")
objTextFile.WriteLine(" <td bordercolor=#0000FF><input type=""text"" size=""25"" name=""Phone"" id=""Phone"" style=""font: x-small""></td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" </table>")
objTextFile.WriteLine(" <hr color=#0000FF></hr>")
objTextFile.WriteLine(" <table border=""1"" width=""100%"" id=""table2"" bordercolor=#0000FF>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td width=1>Categories:</td>")
objTextFile.WriteLine(" <td width=1 bordercolor=#FFFFFF><select name='mainCats' style='font: x-small' onChange='redirect(this.options.selectedIndex);'>")
objTextFile.WriteLine(" <option value='Main Categories'>Main ")
objTextFile.WriteLine(" Categories</option>")
objTextFile.WriteLine(" <option value='CalWIN Prod'>CalWIN Prod</option>")
objTextFile.WriteLine(" <option value='CalWIN Train'>CalWIN Train</option>")
objTextFile.WriteLine(" <option value='CalWIN UAT'>CalWIN UAT</option>")
objTextFile.WriteLine(" <option value='MEDS'>MEDS</option>")
objTextFile.WriteLine(" <option value='Kids'>Kids</option>")
objTextFile.WriteLine(" <option value='Other'>Non CalWIN</option>")
objTextFile.WriteLine(" </select></td>")
objTextFile.WriteLine(" <td width=1 bordercolor=#FFFFFF><div id='hiddenopt1' style='visibility:hidden;'><select name='subCats' style='font: x-small'></select></div></td>")
objTextFile.WriteLine(" <td bordercolor=#FFFFFF><div id='hiddenopt2' style='visibility:hidden;'><select name='subCats2' style='font: x-small' onChange='redirect2(this.options.selectedIndex);'></select></div></td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" </table>")
objTextFile.WriteLine(" <table border='0' width='100%' id='table3'>")
objTextFile.WriteLine(" <tr id='hiddentable1' style='display:none'>")
objTextFile.WriteLine(" <td width='7%' style='font: x-small'><input type='text'name='caseinputbx' maxlength='7' size='8'></td>")
objTextFile.WriteLine(" <td colspan='3' style='font: x-small'>CalWIN Case Number or NA</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable2' style='display:none'>")
objTextFile.WriteLine(" <td width='7%' style='font: x-small'><input name='calwinerrorbx' type='text' id='calwinerrorbx' size='4' maxlength='3'></td>")
objTextFile.WriteLine(" <td width='37%' style='font: x-small'>CalWIN Error Code or NA</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable3' style='display:none'>")
objTextFile.WriteLine(" <td width='7%' style='font: x-small'><input name='noacc' type='text' id='noacc' size='8'></td>")
objTextFile.WriteLine(" <td width='37%' style='font: x-small'>Correspondence Number</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable6' style='display:none'>")
objTextFile.WriteLine(" <td width='7%' style='font: x-small'><input name='MEDSalertbx' type='text' id='MEDSalertbx' size='6' maxlength='4'></td>")
objTextFile.WriteLine(" <td width='37%' style='font: x-small'>MEDS Alert Number or NA</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable7' style='display:none'>")
objTextFile.WriteLine(" <td width='7%' style='font: x-small'><input type='text'name='MEDSinputbx' maxlength='11' size='13'></td>")
objTextFile.WriteLine(" <td colspan='3' style='font: x-small'>SSN/Pseudo# or CIN#</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable4' style='display:none'>")
objTextFile.WriteLine(" <td width='7%' style='font: x-small'>No<input type='radio' value='Not reviewed by Supervisor' checked name='chbxreview'>Yes<input type='radio' value='Reviewed by Supervisor' name='chbxreview' style='font: x-small'></td>")
objTextFile.WriteLine(" <td colspan='3' style='font: x-small'>Has a supervisor Reviewed it?</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable5' style='display:none'>")
objTextFile.WriteLine(" <td style='font: x-small'>No<input type='radio' value='Payment benefit not due today' checked name='chbxpayment'>Yes<input type='radio' value='Payment benefit due today' name='chbxpayment' style='font: x-small'></td>")
objTextFile.WriteLine(" <td colspan='3' style='font: x-small'>Is the applicant payment benefit due today?</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable8' style='display:none'>")
objTextFile.WriteLine(" <td style='font: x-small'>No<input type='radio' value='Not reviewed by a MEDS Liaison' checked name='chbxliaisonreview'>Yes<input type='radio' value='Reviewed by a MEDS Liaison' name='chbxliaisonreview' style='font: x-small'></td>")
objTextFile.WriteLine(" <td colspan='3' style='font: x-small'>Has MEDS Liaison reviewed it?</td>")
objTextFile.WriteLine(" </tr>")


objTextFile.WriteLine(" <tr id='hiddentable9' style='display:none'>")
objTextFile.WriteLine(" <td style='font: x-small'>No<input type='radio' value='No' checked name='chbxsensitivereview' onClick='Sensitiveselcthide(this);'>Yes<input type='radio' value='Yes' name='chbxsensitivereview' style='font: x-small'onClick='Sensitiveselctshow(this);'></td>")
objTextFile.WriteLine(" <td colspan='3' style='font: x-small'>Is this issue time sensitive?</td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr id='hiddentable10' style='display:none'>")
objTextFile.WriteLine(" <td valign='top' style='font: x-small'>Reason?</td>")
objTextFile.WriteLine(" <td style='font: x-small' width='320'><textarea rows='2' wrap='physical' name='Sensitive' cols='55'></textarea></td>")
objTextFile.WriteLine(" </tr>")

objTextFile.WriteLine(" </table>")
objTextFile.WriteLine(" <hr color=#0000FF></hr>")
objTextFile.WriteLine(" <table border='0' width='100%' id='table4'>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td><b>DESCRIPTION:</b></td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td valign='top' style='font: x-small'>What were you trying to do?</td>")
objTextFile.WriteLine(" <td style='font: x-small' width='320'><textarea rows='2' wrap='physical' name='tryingtodo' cols='37'")
objTextFile.WriteLine(" onKeyDown='textCounter(document.ValidForm.tryingtodo,document.ValidForm.remLen,document.ValidForm.remLen1,document.ValidForm.remLen2,document.ValidForm.remLen3)'")
objTextFile.WriteLine(" onKeyUp='textCounter(document.ValidForm.tryingtodo,document.ValidForm.remLen,document.ValidForm.remLen1,document.ValidForm.remLen2,document.ValidForm.remLen3)'></textarea><br>")
objTextFile.WriteLine(" <input readonly type='hidden' name='remLen1' size='5' maxlength='3' value='0'>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td valign='top' style='font: x-small'>What was the System Response?</td>")
objTextFile.WriteLine(" <td style='font: x-small' width='320'><textarea rows='2' wrap='physical' name='systemresponse' cols='37'")
objTextFile.WriteLine(" onKeyDown='textCounter(document.ValidForm.systemresponse,document.ValidForm.remLen,document.ValidForm.remLen2,document.ValidForm.remLen1,document.ValidForm.remLen3)'")
objTextFile.WriteLine(" onKeyUp='textCounter(document.ValidForm.systemresponse,document.ValidForm.remLen,document.ValidForm.remLen2,document.ValidForm.remLen1,document.ValidForm.remLen3)'></textarea><br>")
objTextFile.WriteLine(" <input readonly type='hidden' name='remLen2' size='5' maxlength='3' value='0'>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td valign='top' style='font: x-small'>Did anyone else have the same problem?</td>")
objTextFile.WriteLine(" <td style='font: x-small' width='320'><textarea rows='2' wrap='physical' name='sameproblem' cols='37'")
objTextFile.WriteLine(" onKeyDown='textCounter(document.ValidForm.sameproblem,document.ValidForm.remLen,document.ValidForm.remLen3,document.ValidForm.remLen1,document.ValidForm.remLen2)'")
objTextFile.WriteLine(" onKeyUp='textCounter(document.ValidForm.sameproblem,document.ValidForm.remLen,document.ValidForm.remLen3,document.ValidForm.remLen1,document.ValidForm.remLen2)'></textarea><br>")
objTextFile.WriteLine(" <input readonly type='hidden' name='remLen3' size='5' maxlength='3'value='0'>")
objTextFile.WriteLine(" <input readonly type='text' name='remLen' size='5' maxlength='3' value='800'><font size='1' color='#FF0000'>characters left</font>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" </table>")
objTextFile.WriteLine(" <BR><input type=""button"" name=""Button1"" value=""Submit"" onmouseover=""return validateForm(ValidForm)"">   <input type=""button"" name=""Button2"" value=""Cancel"">")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" <tr>")
objTextFile.WriteLine(" <td>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" </table>")
objTextFile.WriteLine(" </td>")
objTextFile.WriteLine(" </tr>")
objTextFile.WriteLine(" </table>")
objTextFile.WriteLine("<BR>Delete all screenshots when clicking cancel <input type=""checkbox"" value=""1"" name=""DeleteScreenShots"" checked>")
objTextFile.WriteLine("<!-- Start Loop code Below -->")
For Each SS in ScreenShots
If SS <> "" Then
objTextFile.WriteLine(" <p>")
objTextFile.WriteLine(" <a href='" & strTempCaptureDir & "/" & SS & "' target='_blank'><img src='" & strTempCaptureDir & "/" & SS & "' border='0' width=35% height=35%></a><br>")
objTextFile.WriteLine(" <input type='checkbox' name='" & SS & "' value='" & SS & "' checked> Send this image - " & SS & "")
objTextFile.WriteLine(" </p>")
End If
Next
objTextFile.WriteLine("<!-- End Loop code Above -->")
objTextFile.WriteLine(" </div>")
objTextFile.WriteLine(" </form>")
objTextFile.WriteLine("</body>")
objTextFile.WriteLine("</html>")
objTextFile.WriteLine(" <script language='JavaScript'>")
objTextFile.WriteLine(" <!--")
objTextFile.WriteLine(" var temp = document.ValidForm.subCats;")
objTextFile.WriteLine(" var tempB = document.ValidForm.mainCats;")
objTextFile.WriteLine(" var temp2 = document.ValidForm.subCats2;")
objTextFile.WriteLine(" var tempB2 = document.ValidForm.subCats;")
objTextFile.WriteLine(" function redirect(x) {")
objTextFile.WriteLine(" hiddenopt1.style.visibility = 'hidden';")
objTextFile.WriteLine(" hiddenopt2.style.visibility = 'hidden';")
objTextFile.WriteLine(" runloop(10,'None')")
objTextFile.WriteLine(" var tempvalue = String(tempB.options[x].value).substring(0,10);")
objTextFile.WriteLine(" if (tempvalue == 'CalWIN Pro'){")
objTextFile.WriteLine(" hiddenopt1.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddenopt2.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddentable1.style.display = 'block';")
objTextFile.WriteLine(" hiddentable2.style.display = 'block';")
objTextFile.WriteLine(" hiddentable4.style.display = 'block';")
objTextFile.WriteLine(" hiddentable5.style.display = 'block';")
objTextFile.WriteLine(" hiddentable9.style.display = 'block';")
objTextFile.WriteLine(" } else if (tempvalue == 'CalWIN Tra') {")
objTextFile.WriteLine(" hiddenopt1.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddenopt2.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddentable1.style.display = 'block';")
objTextFile.WriteLine(" hiddentable2.style.display = 'block';")
objTextFile.WriteLine(" hiddentable4.style.display = 'block';")
objTextFile.WriteLine(" hiddentable5.style.display = 'block';")
objTextFile.WriteLine(" hiddentable9.style.display = 'block';")
objTextFile.WriteLine(" } else if (tempvalue == 'CalWIN UAT') {")
objTextFile.WriteLine(" hiddenopt1.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddenopt2.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddentable1.style.display = 'block';")
objTextFile.WriteLine(" hiddentable2.style.display = 'block';")
objTextFile.WriteLine(" hiddentable4.style.display = 'block';")
objTextFile.WriteLine(" hiddentable5.style.display = 'block';")
objTextFile.WriteLine(" hiddentable9.style.display = 'block';")
objTextFile.WriteLine(" } else if (tempvalue == 'MEDS') {")
objTextFile.WriteLine(" hiddenopt1.style.visibility = 'visible';")
objTextFile.WriteLine(" hiddentable1.style.display = 'block';")
objTextFile.WriteLine(" hiddentable4.style.display = 'block';")
objTextFile.WriteLine(" hiddentable6.style.display = 'block';")
objTextFile.WriteLine(" hiddentable7.style.display = 'block';")
objTextFile.WriteLine(" hiddentable8.style.display = 'block';")
objTextFile.WriteLine(" hiddentable9.style.display = 'block';")
objTextFile.WriteLine(" }")
objTextFile.WriteLine(" for (m = temp.options.length - 1; m > 0; m--) temp.options[m] = null;")
objTextFile.WriteLine(" for (i = 0; i < group[x].length; i++) temp.options = new Option(group[x].text, group[x].value);")
objTextFile.WriteLine(" temp.options[0].selected = true;")
objTextFile.WriteLine(" for (n = temp2.options.length - 1; n > 0; n--) temp2.options[n] = null;")
objTextFile.WriteLine(" for (j = 0; j < group2[x].length; j++) temp2.options[j] = new Option(group2[x][j].text, group2[x][j].value);")
objTextFile.WriteLine(" temp2.options[0].selected = true;")
objTextFile.WriteLine(" return true;}")
objTextFile.WriteLine(" function runloop(count,status) {")
objTextFile.WriteLine(" for (var a = 1;a <= count; a++){")
objTextFile.WriteLine(" document.getElementById('hiddentable'+a).style.display = status;")
objTextFile.WriteLine(" }")
objTextFile.WriteLine(" return true;}")


objTextFile.WriteLine(" function Sensitiveselctshow(boxid) {")
objTextFile.WriteLine(" document.getElementById('hiddentable10').style.display = 'block';")
objTextFile.WriteLine(" document.ValidForm.Sensitive.value = '';")
objTextFile.WriteLine(" }")
objTextFile.WriteLine(" function Sensitiveselcthide(boxid) {")
objTextFile.WriteLine(" document.getElementById('hiddentable10').style.display = 'none';")
objTextFile.WriteLine(" document.ValidForm.Sensitive.value = 'No Information';")
objTextFile.WriteLine(" }")



objTextFile.WriteLine(" function redirect2(x) {")
objTextFile.WriteLine(" var tempvalue = String(temp2.options[x].value).substring(0,11);")
objTextFile.WriteLine(" if (tempvalue == 'Client Corr'){")
objTextFile.WriteLine(" hiddentable3.style.display = 'block';")
objTextFile.WriteLine(" }")
objTextFile.WriteLine(" return true;}")
objTextFile.WriteLine(" //-->")
objTextFile.WriteLine(" </script>")


objTextFile.Close
End Sub

'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top