Jump to content

heero11yuy

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by heero11yuy

  1. As subject, do anyone know how to open a new windows with no toolbar & fixed size?Do I have to use JS or just HTML is good enough? What I'm doing now is this:<a href="link.html" target="_blank">Test</a>
  2. Thanks a lot, appreciated~! ^^In fact... I've got the logic, but I don't know how to do it technically... >< Actually, what is in the file if I use the filesystemobject? ( that's within a folder, not within a text file )
  3. Hi, please help on this problem:There are many files (*.htm) under 26 folders ( cam_a, cam_b, ..., cam_z )... and I got one word list (wordlist.txt, and of course can save it as xls)... what I needa do is to check every word in the wordlist.txt to see if they DON'T exist in the filename of *.htm under all 26 folders.What I don't know how to do is that:-how to get the word within the wordlist.txt automatically? (cuz there are over 36,000 words)-how to search for the filenames of the files(*.htm) under the 26 folders?My main problems are just can't get the datas... please help!by Roy
  4. Does anyone know how to add a row (a new selection/function) to the list which appears when you right click on a webpage?with what language? html? JS? and how? Thanks & have a great day.
  5. JS problem with "alert", please lend a hand~The following is the code, very simple: status = getstatus(); alert(status); if ( status != "playing"){ ... } else{ ... }When I put the line "alert(status);" into the code, it works & ENTERS into the "if ( status != "playing")" statement, that's what I want...But when I take away the line "alert(status);" from the code, it doesn't work and doesn't enter into the if statement... that means status == "playing" ... getstatus() isn't called? isn't updated? or status isn't written into the correct form for comparing with "playing"? I needa know what alert() does there which creates a bug there... please help~! Urgent
  6. How to Send a var to a PARAM value?Say I have a variable of X...<HTML><HEAD><TITLE>StoryMan Personal Word List</TITLE></HEAD><script type=text/javascript>var X = 999</script><body><table><tr><td><object><param name=abc value="filename.swf?id= X " ><!-- here, I want to set id = var X... does anyone know how to do it? --></OBJECT></TD></TR></TABLE></body></HTML>
  7. Thanks anyways... me too... last time I worked with PERL was 4 years ago... do you know where to check server error log usually? Any usual path?
  8. Yeah, that's what it shows on the browser... I thought you're asking for the Apache log error which I don't quite remember how to get it........ ><
  9. Thanks a lot~! I'm using brower to run the perl file... do you mind to tell me how to check the errors...? ><
  10. >>my $req = $ua->request(HTTP::Request->new( GET => $url ));This line should be the problem... cuz it may not work on HTTP but only the server side?Do you know the correct script for running it on HTTP if possible? If impossible, how could I do it? The followings are the files... the HTML page will call the SECOND FILE... which works perfectly... but it doesn't work for the FIRST FILE's sub(function) getdata... but it works perfectly on the server page...I think the problem is that the HTTP::Request problem... this script should be for running on server side only... does anyone know the script running it on HTTP?FIRST FILE: callasp_storyman.pl#!/usr/bin/perluse warnings;use strict;use CGI qw(:standard);use CGI qw/escape/;use LWP::UserAgent;my $cgi_object = CGI->new();my $url = 'http://mywords.ust.hk/STU/games/game_getdata_storyman.asp';my $file = 'eotw_word_lists_storyman';my $ua = LWP::UserAgent->new();sub getdata {my $req = $ua->request(HTTP::Request->new( GET => $url ));#$req->header('Accept' => '*_/*');my $content = $req->content;my @lines = split("\n",$content);chomp(@lines);my $line;#Sent to a text fileif (unlink($file) == 0) {} else {}sysopen (OUT, $file, 0755, 0755);foreach $line (@lines){print OUT "$line\n"; }close(OUT);}return 1;SECOND FILE: eotw_load_data_storyman.pl#!/usr/local/bin/perlrequire "callasp_storyman.pl";require "eotw_lib.pl";use strict;use CGI qw(:standard);use CGI qw/escape/;my $cgi_object = CGI->new();my $the_list_id;main();sub main() {check_server();validate();#getdata(); get_send_values();}sub get_send_values {my $c_storyman_words_file = "eotw_word_lists_storyman";my $vTheWords;my $vTheTopic;my $i;my $dummy;getdata(); open(WORDS_FILE, $c_storyman_words_file);my @storyman_words = <WORDS_FILE>;close(WORDS_FILE);for ($i=0; $i<@storyman_words; $i++) {if (substr($storyman_words[$i],0,2) == $the_list_id) {($dummy,$vTheTopic) = split(/\|/,$storyman_words[$i]);$vTheWords = $storyman_words[$i+1];last;}}chomp($vTheTopic);chomp($vTheWords);chop($vTheWords); print "Content-type: application/x-www-urlform-encoded\n\n";print "&vTheWords=".escape("${vTheWords}")."&vTheTopic=".escape("${vTheTopic}");}sub validate {print "content-type: text/html \n\n"; $the_list_id = $cgi_object->param("id");if (!$the_list_id) {$the_list_id=1;}die "One of the fields contained inappropriate characters\n" if($the_list_id =~ s/<!--(.|\n)*-->//g);}QUOTE(aspnetguy @ Aug 22 2006, 07:45 PM) hmm... and both scripts are identical you are just runnin gthem with a different method? When you say you run it with HTTP what do you type in the address bar of the browser? Do you type the absolute path (C:\perlscripts\myscript.pl) or do you use a web server (Apache or IIS) (localhost/myscript.pl)?Thanks so much for helping, first of all~ ^^I do use the web server to run it... I think everything is correct except for the script of FIRST FILE... ><I think that the script should be different for running it on server & HTTP, is it?If not, then there must be something else which I don't know... ><
  11. Using runtime... Command line is: Perl filename.plThen it takes & creates a file on the server... but when I run this filename.pl on HTTP / with a HTML file... it doesn't call the ASP page nor create the file which should pick up the output of the ASP page... ><
  12. How to run a perl file / call a perl function on a HTTP page, if possible? Is there any sample for it? It'd be very appreciated if coding is provided... thanks a lot~!I actually wrote it for to run a perl file on its own server, but when I run it on HTTP / a HTML page... it doesn't work... The perl file needs to run an ASP page and then get the text generated by the ASP page, then the perl file will take the text and create a text file on the server.It works on the server, but it doesn't work when I call it on HTTP / with a HTML page... Please give a hand~ urgent~!
  13. Thanks~ it's solved~! I wanted to directly create a text file... ><
  14. Does anyone know how to send some variables to another server which is on a windows platform.Is it able to create test file on another server with Perl?If so, how? Please give a hand.I need to send some datas to another server, say server2, which will receive the datas with ASP... from an Unix based server with Perl.
  15. Dim score_test, fs, f Set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.OpenTextFile(Server.MapPath("top_score_3"), 1) Response.Write(f.ReadLine) f.Close Set f=Nothing Set fs=Nothing >> score_test = I needa store the content of f.ReadLine into score_test, but it's not an Object... may anyone suggest some ways which I can do it?
  16. Does anyone know if I can get the SESSION("userid") with Perl?The Database is on a separate server, the perl runtime is on another separate server on an Unix platform, and there's another server running ASP on a windows platform.The page is generated by ASP... it gets data from the Database server... there's a flash game called from a HTML page generated by ASP, and the flash game calls functions & files from the Perl Unix server... Then, can I get the SESSION("userid") with Perl? If so, may you provide me the scripts as well, thanks a lot~!
  17. If anyone can help me on the following, I'd be very appreciated~! How to retrieve a certain amount of field from a table (MSSQL)Say, I want to retrieve exactly 10 fields from a table?say, a column Word in a table WordList; I needa retrieve 10 words from column Word... may I use LIMIT in MSSQL?Thanks & have a great dayby Roy
  18. Thanks~! I solved the problem!
  19. The case is that I needa check the value of all items in the RecordSet if they have any characters such has, say || or --, I tried the Find function but it doesn't work with Dreamweaver... Does anyone know any other method I can use for doing that?
  20. Thanks a lot, it's very helpful... it doesn't say that it supports XP when I downloaded Perl... so I was wondering if it supports xp... however, appreciated.
  21. Problems with Installing Perl Module (DBI) on windows with PPM --------------------------------------------------------------------------------I don't know why whenever I try to install the perl module DBI thru PPM on windows, the computer is crashed... and restarted... Platform is Windows XP professional, Perl version I used are 5.6 & 5.8.8... I tried both and both have the same problems... please give me a hand, I'd be very appreciated... I need the module DBI installed for finishing my project... The command I typed was:ppm>install dbiit then checked 73 files outta 73 files... then start copying the files... during this process, it crashed & restarted... everytime the same...
×
×
  • Create New...