function help please

  • Thread starter Thread starter Goldie
  • Start date Start date
G

Goldie

Can some please look at this function and maybe help me with why it's
not doing as it's told... :)

It's basicall meant to check to see if that field returned from
database actually has any data in it, and if not, return a display:none
style to hide it from the list

I'm trying to achieve not having to show every option of the columns in
that row, especially if the column is empty (no data)

Function code..
-----------------------
Function HideLink ( val )
If field.IsEmpty(val) then
response.write("display:none")
Else
response.write("")
End If
End Function

Use in page
 
Goldie said:
Can some please look at this function and maybe help me with why it's
not doing as it's told... :)

It's basicall meant to check to see if that field returned from
database actually has any data in it, and if not, return a display:none
style to hide it from the list

I'm trying to achieve not having to show every option of the columns in
that row, especially if the column is empty (no data)

Function code..
-----------------------
Function HideLink ( val )
If field.IsEmpty(val) then
response.write("display:none")
Else
response.write("")
End If
End Function

Use in page

1. Your function doesn't set any return value.

2. Your function is writing a string to the response stream while the
page is being parsed. The string will probably end up at the top of the
page.

3. You have forgotten to put the css style in the style property of the
tag. You are trying to use it as if the css style was an html property.
 
Back
Top