By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

Dynamic HTML size

P: 4
Hi

Generating dynamic HTML via CGI script
(for example a file list)
I would like to send an alert if the size is greater as some limit
Apr 12 '12 #1
Share this Question
Share on Google+
6 Replies


gits
Expert Mod 5K+
P: 5,390
could you please explain your issue in more detail so that a reader could follow it? and what do you have done so far to solve the problem?
Apr 12 '12 #2

P: 4
Hi

A CGI script is generating the HTML page , as reading a file and put out the content into a dynamic HTML page. If the file size is greater as a limit, I would like to send an alert or some other kind of notification and stop the HTML generation .
Apr 12 '12 #3

gits
Expert Mod 5K+
P: 5,390
then i would suggest that the CGI script checks the filesize first - if the input-file is less then the limit then fine - otherwise it creates another output with your mentioned notice. this could even include the generation of JavaScript code into the page.
Apr 12 '12 #4

P: 4
Hi

Unfortunatly I can determine the file size only if I read in. The server is running on a mainframe z/OS system .
Apr 12 '12 #5

gits
Expert Mod 5K+
P: 5,390
uhhh ... i'm not familiar with such ... but if this is the case then you even read it in - determine the size and then decide which output is to be generated. looks like overhead of course, and it is - but i can't say whether or how to determine filesize if something like this fails:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl -w
  2.  
  3. $filename = '/path/to/your/file.ext';
  4. $filesize = -s $filename;
PS: such a question might be answered better in the PERL forum then
Apr 12 '12 #6

P: 4
Hi

I hoped to put out some fancy message on the top of the HTML page, if I notice at the end of the HTML page, that the input is too large
Apr 12 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.