Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:39 AM
Sten Westerback
Guest
 
Posts: n/a
Default Including .htm files conditionally?

Hi

I'm considering using .asp to implement a selective
inclusion of .htm files containing tables into a HTML
code sent to browser from IIS.

My question is if it is possible to make an .asp page
that depending on two variables passed in the query
(start-month and end-month) return to the browser a
page that includes only files with names within the
specified months?

Lets take it ones more: ;)
1. the .htm files are ready for use and named month01.htm (january) etc.
2. the user enters wanted months on a form in the browser
3. the .asp constructs HTML code that starts with some static html code,
inserts the table for the first month, then some other text such as
"February",
then the next month etc stopping with the month defined on the input
form.

Is this type of thing possible with .asp using some scripting language?
Or do i need my own IIS Extension for this too?

Also, is it possible to let a server side script analyze a file to extract
information from the table to calculate the sum of the values in all the
tables in each column?

Could the filtering and calculations be done "easily" with client scripting?

Rgds,
Sten



  #2  
Old July 19th, 2005, 11:39 AM
Ray at
Guest
 
Posts: n/a
Default Re: Including .htm files conditionally?

http://www.aspfaq.com/5004
http://www.aspfaq.com/2042

Ray at work

"Sten Westerback" <sten.westerback@NO_SPAMnokia.com> wrote in message
news:NwQTb.8333$k4.182056@news1.nokia.com...[color=blue]
> Hi
>
> I'm considering using .asp to implement a selective
> inclusion of .htm files containing tables into a HTML
> code sent to browser from IIS.
>
> My question is if it is possible to make an .asp page
> that depending on two variables passed in the query
> (start-month and end-month) return to the browser a
> page that includes only files with names within the
> specified months?
>
> Lets take it ones more: ;)
> 1. the .htm files are ready for use and named month01.htm (january) etc.
> 2. the user enters wanted months on a form in the browser
> 3. the .asp constructs HTML code that starts with some static html code,
> inserts the table for the first month, then some other text such as
> "February",
> then the next month etc stopping with the month defined on the input
> form.
>
> Is this type of thing possible with .asp using some scripting language?
> Or do i need my own IIS Extension for this too?
>
> Also, is it possible to let a server side script analyze a file to extract
> information from the table to calculate the sum of the values in all the
> tables in each column?
>
> Could the filtering and calculations be done "easily" with client[/color]
scripting?[color=blue]
>
> Rgds,
> Sten
>
>
>[/color]


  #3  
Old July 19th, 2005, 11:39 AM
Igor Tandetnik
Guest
 
Posts: n/a
Default Re: Including .htm files conditionally?

"Sten Westerback" <sten.westerback@NO_SPAMnokia.com> wrote in message
news:NwQTb.8333$k4.182056@news1.nokia.com...[color=blue]
> My question is if it is possible to make an .asp page
> that depending on two variables passed in the query
> (start-month and end-month) return to the browser a
> page that includes only files with names within the
> specified months?[/color]

Of course. Don't make them complete HTMLs, make them HTML fragments
(that is, no <html> or <body> tags, just the parts that they should
contribute to the body). Your ASP page will output the prolog (<html>,
<head> and <body> tags as appropriate), then read and Response.Write
only the files that you want to include, then output the epilog (such as
</body> and </html>).
[color=blue]
> Also, is it possible to let a server side script analyze a file to[/color]
extract[color=blue]
> information from the table to calculate the sum of the values in all[/color]
the[color=blue]
> tables in each column?[/color]

Well, if the file has a good consistent structure (say, a CSV), VBScript
is good enough to write simple parsing in.
[color=blue]
> Could the filtering and calculations be done "easily" with client[/color]
scripting?

For the client to do it, you need to have the server send the data in a
parsable format. E.g. <script> tag that declares arrays, or an XML
island. But to do that, the server needs to parse the files anyway, so
it can just perform the calculations as well.
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles