I am trying to format a series of textareas by passing data to a function and returning the tag line. I'm having some problems with the formatting of the return value of the function.
<dumb??>
also,do I need to pass the array to the function, or is it just in memory and doesn't need to be passed.
</dumb??>
your help is really appreciated
ps. yes, I did a search and looked in the FAQ's, but if you know of something I missed, please don't hesitate to point me there.
browser - IE6 everywhere
tool - DreamweaverMX
backend - SQL7.0
here is the code for the text area
<input name="day1" type="text" id="day1"
<%response.write(buildstring(sday1,(qryElements.Fields.Item("numelementid"
.Value),dataArray))%>
size="5" >
function buildstring(lookdate,subcat,dArray)
dim numRows,i,lockcheck
' on error resume next
numRows = ubound(darray,2)
if numRows = 0 then
buildstring="Value = ""0""
else
do until dArray(1,i) = subcat and dArray(2,i) = lookdate
for i = 0 to numRows
if dArray(3,i) = 1 then
buildstring = "style=""background-color:yellow"" READONLY Value = "" & dArray(4,i) & ""
else
buildstring = "Value = "" & dArray(4,i) & ""
end if
next
loop
end if
end function
Rob Mills
System Analyst
Correctional Services Canada
(all statements are my own ...., ah hell, its the government, sue'em anyway)
<dumb??>
also,do I need to pass the array to the function, or is it just in memory and doesn't need to be passed.
</dumb??>
your help is really appreciated
ps. yes, I did a search and looked in the FAQ's, but if you know of something I missed, please don't hesitate to point me there.
browser - IE6 everywhere
tool - DreamweaverMX
backend - SQL7.0
here is the code for the text area
<input name="day1" type="text" id="day1"
<%response.write(buildstring(sday1,(qryElements.Fields.Item("numelementid"
size="5" >
function buildstring(lookdate,subcat,dArray)
dim numRows,i,lockcheck
' on error resume next
numRows = ubound(darray,2)
if numRows = 0 then
buildstring="Value = ""0""
else
do until dArray(1,i) = subcat and dArray(2,i) = lookdate
for i = 0 to numRows
if dArray(3,i) = 1 then
buildstring = "style=""background-color:yellow"" READONLY Value = "" & dArray(4,i) & ""
else
buildstring = "Value = "" & dArray(4,i) & ""
end if
next
loop
end if
end function
Rob Mills
System Analyst
Correctional Services Canada
(all statements are my own ...., ah hell, its the government, sue'em anyway)