Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: lcs01
  • Content: Threads
  • Order by date
  1. lcs01

    JS code created by CGI::Ajax behaves unexpectedly

    I wrote a small perl ajax code to do the following: A form has three input areas: first name, last name, & login ID. When a user enters first/last name and clicked the login ID area, a login ID will be automatically populated through perl ajax code. But it should also let a user to pick his/her...
  2. lcs01

    Trouble in using MIME::Lite

    Experts, I wrote a small testing code to send email with an attachment using MIME::Lite. I can receive the email with the attachment. However, the size of the attachment is always ZERO bytes. The following is my code: use strict; use MIME::Lite; my $srceDir = './'; my $filename = $ARGV[0]...
  3. lcs01

    Could this be an improper implementation in CGI::Ajax

    I have been playing with CGI::Ajax these days. Lately, I noticed my code always caused an error: ... returning Bad Request status 400 Then I found out that the error was due to I named one of CGI variable names as 'fname', meaning 'First Name'. Unfortunately, this CGI variable name 'fname'...
  4. lcs01

    How to turn on color syntax highlighting in vi or vim

    I've been using Ubuntu over a year now. I always use vim to do the progaming work. I know vim has a feature with color syntax highlighting. But I don't know how to make it work. I did lots of research online and tried different things in my .vimrc and .gvimrc files. However, I just could not...
  5. lcs01

    questions about CGI::Perljax.pm

    I am learning ajax and perljax. I tried to install perljax in one my company's linux server but failed. Here is the error message: % make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/001_load....# Failed test...
  6. lcs01

    Please help in polishing my code

    Requirements: ============= There is an array containing unknown number of elements. Among these elements, one could be 'aaa' and the other 'bbb'. The rest elements are less significant. If this array does contain 'aaa' and/or 'bbb', a new new array '@r' will be created whose last element is...
  7. lcs01

    Again, how to calculate cpu time.

    Last October, I asked a question here about how to calculate cpu time a program consumes Thread 1294251 (http://www.tek-tips.com/viewthread.cfm?qid=1294251). With Kevin and Miller's help, I got that one solved. Thanks to Kevin and Miller! Now I am having a similar question. This time I am...
  8. lcs01

    Can not make string library 'replace()' work

    I can not believe why such a simpel js code would not work!! <html> <head> <script type="text/javascript">//<![CDATA[ function clean(str) { var regex = /\s*/; //var regex = /\s+/; var nstr = str.replace(regex, '^'); alert('str = #' + str + '#, nstr = #' + nstr + '#'); //...
  9. lcs01

    A page works with I, but not with Firefox.

    Hi, Experts, I wrote a simple webpage using css, which is OK with IE, except the table form is not centered (I don't know why). But it is awefully wrong with Firefox 1.5. I appreciate someone could help me to make the page work with both browsers. Here is my html code: <!DOCTYPE html...
  10. lcs01

    Something related to &quot;unterminated string constant&quot; error

    One of my company's page contains a line like this: function printTitle() { parent.searchTermsPane.document.write("<script>function hideIt(aControl) {alert(aControl.name);}</script>/* some implementations omitted here */"); } The page has worked well since day one. However, since last...
  11. lcs01

    Why does this code not work?

    Hi, Experts, Here is a small piece of my perl code: use strict; use CGI::Pretty qw( :html3 ); my $q = new CGI::Pretty; my @arr = ('a', 'b', 'c', 'd'); my (@cArr, %cLable); my $select = "Pick One"; push @cArr, "'$select'"; $cLable{$select} = "0"; my $i = 1; foreach (@arr) { push @cArr...
  12. lcs01

    My dhtml/css page only works with IE, but not Firefox 1.5.

    Hi, Experts, I am writing some DHTML page which uses a css file. DHTML file (The JS codes are ommitted): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"...
  13. lcs01

    Could someone help me in enhancing this code

    Hi, Experts, I wrote a piece of html/javascript code, which does following: 1) if you select a country name other than USA, then you need to enter a state/province name; 2) if you select USA, then you need to pick a state name from a dropdown list. Here is my code: <HTML> <HEAD>...
  14. lcs01

    How to trigger a server side code in JS w/o using open()?

    Experts, I want to implement a web form like this: Ask a user to enter his/her firstname & lastname, then create an ID for this user. The first choice would be first initial + lastname. But I should check it for the uniqueness before I populate this ID to the user. The uniqueness verification...
  15. lcs01

    A question about using CGI.pm

    I have been using CGI.pm for quite some time now. I often found the html code rendered by CGI.pm unreadable. For instance: table(tr(..),tr(..),...,tr(..)); The above code can create a very, very long html code. Is there a way to insert line breaks while calling CGI.pm's subroutines, so that...
  16. lcs01

    Help need in undertanding onChange, onSubmit &amp; more

    Experts, I wrote a small piece of js/html code like this: <head> <script language="JavaScript" type="text/javascript"> function isBlank (userInput) { var val = userInput.value; alert('In isBlank(), val = ' + val); // for debug only /* what I want to do: if userInput is blank, ask users to...
  17. lcs01

    Bold fonts not working with buttons in IE.

    I am having a very simple question that I don't know how to solve it: <b> <input type="submit" value="Submit" /> <input type="reset" value="Cancel" /> </b> Why can I not get the bold fonts in IE 6 and 7? It works fine in Firefox. What do I miss here? Thank you.
  18. lcs01

    A newbie question about using css file

    Hi, experts, I am learning how to use css files. And the following is a simple example I wrote: html file (created by perl+cgi.pm): <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> <html...
  19. lcs01

    Why does this cron job not work?

    Here is the output of 'crontab -e': 01 08 * * * /home/userID/mybin/saveLogs.pl > /dev/null 2>&1 01 09 * * * /home/userID/logs/zipLogs.csh > /dev/null 2>&1 The first one works OK. But the 2nd does not work at all. However, while I was in /home/userID/logs and manually execute this script...
  20. lcs01

    Codes works with IE, but not with Firefox.

    Hi, Experts, I have written a piece of perl/javascript codes listed below (a bit long, sorry. But it is portable to your local machine if you would like to do a test run): #!/usr/local/bin/perl use strict; use CGI qw/:all/; local $| = 1; my $title = "Test"; my $dilimiter = '__'; my...

Part and Inventory Search

Back
Top