Dynamic HTML size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mszigetvari
    New Member
    • Apr 2012
    • 4

    Dynamic HTML size

    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
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    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?

    Comment

    • mszigetvari
      New Member
      • Apr 2012
      • 4

      #3
      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 .

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        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.

        Comment

        • mszigetvari
          New Member
          • Apr 2012
          • 4

          #5
          Hi

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

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            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:

            Code:
            #!/usr/bin/perl -w
             
            $filename = '/path/to/your/file.ext';
            $filesize = -s $filename;
            PS: such a question might be answered better in the PERL forum then
            Last edited by gits; Apr 12 '12, 01:09 PM.

            Comment

            • mszigetvari
              New Member
              • Apr 2012
              • 4

              #7
              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

              Comment

              Working...