Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] An interesting question

Expand Messages
  • Octavian Rasnita
    You cannot use an SSI statement generated by a Javascript function. The SSI statement is executed by a web server module on the server, and the result is
    Message 1 of 1 , Mar 28, 2003
      You cannot use an SSI statement generated by a Javascript function.
      The SSI statement is executed by a web server module on the server, and the
      result is common HTML, while the Javascript code travels unchanged to the
      clients' browser, and it is executed on their computers.

      You can't even use an SSI statement from a CGI program directly, because a
      web server module executes the SSI statements, and another one the CGI
      programs.

      So if you will have something like the following code, it won't work:

      print <<eof;
      <!--#include virtual="/cgi-bin/script.pl" -->
      eof

      It will just print that code in the web page as a common comment.

      I heard that there is a perl module that translates and executes the SSI
      statements from a CGI program, but it definitely won't work from a
      Javascript code.

      Teddy,
      Teddy's Center: http://teddy.fcc.ro/
      Email: orasnita@...

      ----- Original Message -----
      From: "kjhseka" <kjhseka@...>
      To: <perl-beginner@yahoogroups.com>
      Sent: Saturday, March 29, 2003 7:11 AM
      Subject: [PBML] An interesting question


      Hello, I have a very interesting question. Is it possible to call an
      SSI in a dynamically generated html? In other words, if I write a
      JavaScript function that containg an html that contains a SSI it
      works?

      For example, consider the following:

      function GenerateFtr()
      {
      var code="";
      code += '<table><tr>';
      code += '<td width="50%" align="center">';
      code += '<div class="notas">© my copyright enr. all rights
      reserved</div></td>';
      code += '<td width="25%" align="right">';
      code += '<font size=1>This site has been accessed by ';
      //Dynamic comments are ignored in JavaScript
      code += '\<\!\-\-\#include virtual="/cgi-bin/counter.pl"\-\-\> ';
      code += 'users</font>\';
      code += '</tr><tr></table>';
      document.write(code);
      }

      This will not print the number of visitors. In a static html it will.
      The script works well, so it doesn't contain error. But, when I
      generate html in this way, the perl script doesn't respond.

      My question is: I have some error in the code or it is not possible
      to generate an SSI call dynamically? There is other way to do that?

      Thanks a lot for any answer
      Alph



      Unsubscribing info is here:
      http://help.yahoo.com/help/us/groups/groups-32.html

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.