|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
function help pleasenot 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 ---------------------- <a href="pdf/<%# Eval("content_type_msds") %>" <%# HideLink ( Container.DataItem("content_type_msds") )%>>MSDS</a> See responses in other NG.
Show quoteHide quote "Goldie" <goldi***@gmail.com> wrote in message news:1154388571.391688.98370@75g2000cwc.googlegroups.com... > 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 > ---------------------- > > <a href="pdf/<%# Eval("content_type_msds") %>" <%# HideLink ( > Container.DataItem("content_type_msds") )%>>MSDS</a> > Goldie wrote:
Show quoteHide quote > Can some please look at this function and maybe help me with why it's 1. Your function doesn't set any return value.> 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 > ---------------------- > > <a href="pdf/<%# Eval("content_type_msds") %>" <%# HideLink ( > Container.DataItem("content_type_msds") )%>>MSDS</a> > 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.
Space in textBox
Auto Increment Version in VB 2005 ToolBox Icon corruption VB2005 Transparent backcolor SqlDataAdapter Questions Thread safe TextWriter question How do I copy all text files into one??? eg; Shell("copy c:\CND\dr*.txt C:\CND\TestC.txx") Problem with System.IO.File.Move and Catching Exceptions Creating ToolWindows with .NET in VBE Select node |
|||||||||||||||||||||||