B
Brian Piotrowski
Hi All,
I'm having a bit of trouble with a subroutine I am calling when it is
invoked for the first time. When the subroutine runs, I expect it to return
a value for every time it is called. However, it seems as though the first
time it is run, I don't get any returned values. However, subsequent
returns will get me something back.
Here is how I am calling the code and the first line it is supposed to
populate with a return value:
<% GetBGColour(rsMATRIX("pad12a")) %>
<td bgcolor="<%response.write(caseclr)%>" align="center"
height="75" class="hugeboldwhitetext"><% Response.Write(rsMATRIX("pad12a"))
%><br>
<table width="100%" align="center">
<tr>
<td bgcolor="<%response.write(caseclr)%>" align="center"
class="regtext"><% Response.Write(rsMATRIX("pad12acom")) %></td>
</tr>
</table>
</td>
And here is the subroutine:
<% Sub GetBGColour(padnumber)
response.write("Pad: " & padnumber & " ")
'This code will check to see if the case is in the current dash. If not,
grey out the box.
If isarray(ICArray) = true Then
chgcolor=0
For kdcase = 0 to UBound(ICArray, 2)
If chgcolor <> 1 Then
If InStr(1,Replace(padnumber,"-",nullchar),ICArray(0,kdcase),1) = 0
Then
caseclr = "#999999"
Else
caseclr = "green"
chgcolor=1
End If
End If
Next
End If
' This code checks the case - if it's been scanned, change the bgcolor
from red to green
If IsArray(CSArray) = true Then
For kdcase = 0 to UBound(CSArray, 2)
If InStr(1,Replace(padnumber,"-",nullchar),CSArray(0,kdcase),1) = 1 Then
caseclr = "red"
End If
Next
End If
response.write("Colour: " & caseclr & "<BR>")
End Sub
%>
Any idea why the first time it is fired it will not return any values, but
it will work with subsequent calls? I know there is a value for CASECLR -
when I use the response.write statements, I see that for the first time it
is called, it does return a value, but the value does not get back to my
"<%response.write(caseclr)%>" statement.
Any ideas?
Thanks!
I'm having a bit of trouble with a subroutine I am calling when it is
invoked for the first time. When the subroutine runs, I expect it to return
a value for every time it is called. However, it seems as though the first
time it is run, I don't get any returned values. However, subsequent
returns will get me something back.
Here is how I am calling the code and the first line it is supposed to
populate with a return value:
<% GetBGColour(rsMATRIX("pad12a")) %>
<td bgcolor="<%response.write(caseclr)%>" align="center"
height="75" class="hugeboldwhitetext"><% Response.Write(rsMATRIX("pad12a"))
%><br>
<table width="100%" align="center">
<tr>
<td bgcolor="<%response.write(caseclr)%>" align="center"
class="regtext"><% Response.Write(rsMATRIX("pad12acom")) %></td>
</tr>
</table>
</td>
And here is the subroutine:
<% Sub GetBGColour(padnumber)
response.write("Pad: " & padnumber & " ")
'This code will check to see if the case is in the current dash. If not,
grey out the box.
If isarray(ICArray) = true Then
chgcolor=0
For kdcase = 0 to UBound(ICArray, 2)
If chgcolor <> 1 Then
If InStr(1,Replace(padnumber,"-",nullchar),ICArray(0,kdcase),1) = 0
Then
caseclr = "#999999"
Else
caseclr = "green"
chgcolor=1
End If
End If
Next
End If
' This code checks the case - if it's been scanned, change the bgcolor
from red to green
If IsArray(CSArray) = true Then
For kdcase = 0 to UBound(CSArray, 2)
If InStr(1,Replace(padnumber,"-",nullchar),CSArray(0,kdcase),1) = 1 Then
caseclr = "red"
End If
Next
End If
response.write("Colour: " & caseclr & "<BR>")
End Sub
%>
Any idea why the first time it is fired it will not return any values, but
it will work with subsequent calls? I know there is a value for CASECLR -
when I use the response.write statements, I see that for the first time it
is called, it does return a value, but the value does not get back to my
"<%response.write(caseclr)%>" statement.
Any ideas?
Thanks!