Romanichine
Programmer
Hi,
I got a function that receives a string with delimiters and populates a select box (see code below). It works fine on one computer using IE 6.0 but doesn't work on two computers using IE 5.0.
I was wondering if this was a browser issue and, if yes, how to make it work on any browser.
The error we get is "Invalid Argument" on the following line:
cboReport.options.add objOption
======================
======================
Thanks,
--
Roman
I got a function that receives a string with delimiters and populates a select box (see code below). It works fine on one computer using IE 6.0 but doesn't work on two computers using IE 5.0.
I was wondering if this was a browser issue and, if yes, how to make it work on any browser.
The error we get is "Invalid Argument" on the following line:
cboReport.options.add objOption
======================
Code:
Sub RefreshList(dataArr, strSource, strComboName)
Dim cboReport
Dim lngMaxCtr, lngCtr
Dim arrReport, arrOneReport
Dim objOption
Dim i
Set cboReport = window.Parent.Top("fraMain").document.Forms(strSource).Item(strComboName)
lngMaxCtr = cboReport.length - 1
For lngCtr = 0 To lngMaxCtr
cboReport.remove(0)
Next
If dataArr = vbNullString Then
Exit Sub
End If
arrReport = Split(dataArr,"^")
for i = 0 to UBound(arrReport)
arrOneReport = Split(arrReport(i),"|")
Set objOption = document.createElement("option")
'arrOneReport(0) -> report_id
'arrOneReport(1) -> user_id
'arrOneReport(2) -> report_string
'arrOneReport(3) -> report_name
objOption.value = arrOneReport(0)
objOption.text = arrOneReport(3)
cboReport.options.add objOption
next
set objOption = Nothing
End Sub
Thanks,
--
Roman