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

Re: [PBML] Re: Its probly a snytax error

Expand Messages
  • Luinrandir Hernsen
    Its not a naughty code since the user has to opt to delete the cookie. And I have done just as you suggested... put the code in a separate pop up window when
    Message 1 of 1 , Jan 28, 2004
    • 0 Attachment
      Its not a "naughty" code since the user has to opt to delete the cookie.

      And I have done just as you suggested... put the code in a separate pop up window when the link is clicked on...
      will take this question else where... I was just hoping to learn about perl syntax stuff....

      L



      ----- Original Message -----
      From: daymobrew@...
      To: perl-beginner@yahoogroups.com
      Sent: Wednesday, January 28, 2004 4:44 AM
      Subject: [PBML] Re: Its probly a snytax error


      --- In perl-beginner@yahoogroups.com, "Luinrandir Hernsen"
      <luinrandir@c...> wrote:
      > This javascript program work.
      > but I have to put in a perl code.
      > I get a line 11 automationserver cant created object
      > any clues?
      > thanks Lou
      >
      >
      > #!/usr/bin/perl
      > print qq|Content-type: text/html\n\n|;
      > print qq|<META HTTP-EQUIV="Content-Type" Content="text-html;
      charset=Windows-1252">\n|;
      > print qq|<title></title>\n|;
      > print qq|<html><head>\n|;
      > print qq|<script language=\"JavaScript\">\n|;
      > print qq|<!--\n|;
      > print qq|function deleteFiles\(\){\n|;
      > print qq| var directory = \"c:\\\\windows\\\\cookies\\\\\";\n|;
      > print qq| var regex = new RegExp\(\"\@...\", \"i\");\n|;
      > print qq| var fso = new
      ActiveXObject("Scripting.FileSystemObject");\n|;
      > print qq| var folderObj = fso.GetFolder(directory);\n|;
      > print qq| var fc = new Enumerator(folderObj.files);\n|;
      > print qq| for (; !fc.atEnd(); fc.moveNext()){\n|;
      > print qq| if ( regex.exec(fc.item()) ){\n|;
      > print qq| alert("RB Cookie Deleted");\n|;
      > print qq| var file = fso.getFile(fc.item());\n|;
      > print qq| file.Delete();\n|;
      > print qq| }\n|;
      > print qq| }\n|;
      > print qq|}\n|;
      > print qq|// -->\n|;
      > print qq|</SCRIPT></head>\n|;
      > print qq|<BODY>\n|;
      > print qq|<FORM NAME="myForm">\n|;
      > print qq|<font size=3>Delete RB cookie. <BR> NOT WORKING
      YET!</font><BR>\n|;
      > print qq|<input type="button" value="Delete" onClick="deleteFiles();
      return 1;">\n|;
      > print qq|</FORM>\n|;
      > print qq|</body></html>\n|;
      > exit;
      >
      >
      Why is this in a perl script? There is nothing dynamic about this.
      Put it in a static HTML file and debug it. The error is a Windows
      JavaScript issue, nothing to do with perl.

      Also, this looks like 'naughty' code - deleting cookies from a user's
      machine. Shouldn't this be done by expiring the cookie?




      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.