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...
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]...
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'...
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...
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...
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...
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...
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 + '#');
//...
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...
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...
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...
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"...
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>...
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...
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...
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...
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.
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.