Re: HTML Code Question
From: Harddrive747 (Harddrive747_at_discussions.microsoft.com)
Date: 10/18/04
- Next message: E. T. Culling: "Re: Photo gallery reinstall"
- Previous message: Kathleen Anderson [MVP - FrontPage]: "Re: Old deleted info shows up in search"
- In reply to: Andrew Murray: "Re: HTML Code Question"
- Next in thread: Kathleen Anderson [MVP - FrontPage]: "Re: HTML Code Question"
- Reply: Kathleen Anderson [MVP - FrontPage]: "Re: HTML Code Question"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 17 Oct 2004 18:33:05 -0700
Andrew you are a bit on the wrong track, so let me see if I can clarify what
I'm looking for.
I'm able to get the information out of the database and onto a web page.
I'm able to format it and make it look good. However, there are certain
fields that don't have any data in them and I do not want to display those
fields if they aren't filled in.
So for example, the following is what I get out of the database and the word
"to" is just normal text with the fields around it.
<DB Field> to <DB Field>
7:00:00 PM to 11:30:00 PM
So if the ending time, which is 11:30 is blank then all I want to show on
the page is
7:00:00 PM not 7:00:00 PM to
And if the line is totally blank, then I don't want it to display anything.
So I'm looking to do some coding that will check to see if the value of a
field is not NULL or BLANK and display the field on the screen.
So the above "IF" statement woud look something like
if Ending_time is not blank
then
print Start_Time to Ending_Time
Else
print Start_Time
Endif
I want to know if I can put a piece of code like the above into the ASP page
so that I can format the output of the data.
I hope I have explained this better.
"Andrew Murray" wrote:
> I don't quite know what you're getting at...however,
>
> You can create custom queries in your database results wizard - is this what you
> mean? - else you need to write the asp code from scratch, rather than using
> Frontpage's code.
>
>
> If there is data in a field it is going to be written to the database....and
> blank fields will have no data in them.....why the need to check?
>
> If you want data validation, you can do this through Frontpage - right click the
> field, choose form field properties, then the "validate" button on the dialogue.
> Then you can do simple validation such as checking a field has a certain type of
> data e.g. numerical or alpha only, or date/time format, or even have it so the
> data needs to be required in a certain field or even set a maximum limit on the
> number of characters.
>
> Can you supply further info, if I'm on the wrong track here?
>
> "Harddrive747" <Harddrive747@discussions.microsoft.com> wrote in message
> news:BC233367-4D8E-4366-B2BC-0856AC3FC312@microsoft.com...
> > I have been working in FrontPage for a few days. I have created a link to a
> > Database and am able to get the information out.
> >
> > I have some fields that are empty or blank. They are specifically time
> > fields or can be text or memo fields. Almost anyone of my fields can be
> > empty or blank.
> >
> > My question is how do I put a statement in the web (HTML,ASP) page to check
> > for the above condition? So I'm basically looking to do an "If Then Else"
> > statement such as
> >
> > if field(Time) is not blank
> > then print "to " Database field name
> >
> > Also along the same lines, is it possible to put a "for To" loop or a "Do
> > While" statement into the code? I have a set of data that I want a section
> > heading followed by data and so forth. Basically trying to create a
> > organizational report.
> >
> > Any question, let me know.
> > Thanks
> > Terry
>
>
>
- Next message: E. T. Culling: "Re: Photo gallery reinstall"
- Previous message: Kathleen Anderson [MVP - FrontPage]: "Re: Old deleted info shows up in search"
- In reply to: Andrew Murray: "Re: HTML Code Question"
- Next in thread: Kathleen Anderson [MVP - FrontPage]: "Re: HTML Code Question"
- Reply: Kathleen Anderson [MVP - FrontPage]: "Re: HTML Code Question"
- Messages sorted by: [ date ] [ thread ]