Hi there
Can anyone see what I am doing wrong? I am using SQL Server 2000 and ASP
This is how I am calling my function:
<select name="blah">
<%WriteShowTime=ShowTime("intDepartureMinuteOption", strDepartureMinute, 0, 59, 5)%>
</select>
and this is my function here:
function ShowTime(strLoopVariable, strConstantVariable, intStartFrom, intEndAt, intStep)
for strLoopVariable=intStartFrom to intEndAt step intStep
if strLoopVariable<10 then strLoopVariable="0" & strLoopVariable
Response.Write "<option value=""" & strLoopVariable & """"
if strLoopVariable=strConstantVariable then Response.Write " SELECTED"
Response.Write ">" & strLoopVariable & "</option>"
next
end function
The problem that I am getting is that it is very temperamental as to whether it will do the "Selected" part of the loop.
If anyone has any ideas as to what I am doing wrong, your advice, hints, tips would be much appreciated.
Thanks in advance
Can anyone see what I am doing wrong? I am using SQL Server 2000 and ASP
This is how I am calling my function:
<select name="blah">
<%WriteShowTime=ShowTime("intDepartureMinuteOption", strDepartureMinute, 0, 59, 5)%>
</select>
and this is my function here:
function ShowTime(strLoopVariable, strConstantVariable, intStartFrom, intEndAt, intStep)
for strLoopVariable=intStartFrom to intEndAt step intStep
if strLoopVariable<10 then strLoopVariable="0" & strLoopVariable
Response.Write "<option value=""" & strLoopVariable & """"
if strLoopVariable=strConstantVariable then Response.Write " SELECTED"
Response.Write ">" & strLoopVariable & "</option>"
next
end function
The problem that I am getting is that it is very temperamental as to whether it will do the "Selected" part of the loop.
If anyone has any ideas as to what I am doing wrong, your advice, hints, tips would be much appreciated.
Thanks in advance