|
TexasWebDevelopers -> RE: Removing initial state from dropdown box (5/18/2009 12:14:05)
|
But what if some other field had a null? By providing numerals for fields with no values you can control the display. You may want to substitute text for one field that is null that says "No response given" and simply not display text at all for another field that returns null. If all of the fields are nulll then you have given up control. (Although it may not matter in specific cases where there is ONLY ONE field that is allowed to be null. It just depends on how you want the display to look. Lets say the value was a State name in an address and you wanted it to display "City, State Postal_code" If you left the field null and did not substitute anything for the null then the display is: "City, Postal_code" If the State were forced to "0" you would obviously NOT display : "City, 0 Postal_code" But substitute other text or a non-breaking space. The problem above is fairly easy, but what about items displayed in a list where "item 2" did not have an value?: That display looks pretty bad. So the display can be controlled by NOT displaying fields="0" just as easily as substituting text like this: <ul> <% Do until rsWhatever.EOF If rsWhatever("fieldname")<>"0" then%> <li><%=rsWhatever("fieldname")%></li> <% rsWhatever.MoveNext loop end if %> And then the display looks like this:
|
|
|
|