CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
hyperlink

 



raven
Deleted

Dec 21, 2000, 6:05 PM

Post #1 of 3 (279 views)
hyperlink Can't Post

Every time I create a hyperlink above a form, every element in that form becomes a hyper link, how can I avoid this? Here is a snippet of the code. Thanx Raven

use CGI;

$co=new CGI;
# assign local time to variable
$virtclock=localtime;

print $co->header,
# create page and display time
$co->start_html(-title=>'Virtual Clock',
-BGCOLOR=>'fffff0'),
$co->h1(' A Virtual Clock '),
"The current time is $virtclock.",
$co->hr,
$co->center($co->a({href=>"http://xxxxxxxxxxx/~raven/raven.htm"}),"Click Here To Go Home"),
$co->start_form
(
-method=>'POST',
-action=>"http://xxxxxxxxx/raven-bin/result.cgi"
),
"Please enter your name: ",
(
........
$co->end_form



japhy
Enthusiast

Dec 22, 2000, 7:22 AM

Post #2 of 3 (274 views)
Re: hyperlink [In reply to] Can't Post

The text to be linked is an argument to the a method. Your code was:


Code
print $q->center( 
$q->a( { href => $some_URL } ), "Text"
);

You close the parens to a too soon.


Code
print $q->center( 
$q->a( { href => $some_URL }, "Text" )
);


Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author


raven
Deleted

Dec 22, 2000, 8:46 AM

Post #3 of 3 (270 views)
Re: hyperlink [In reply to] Can't Post

Thanx Japhy, works great now.


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives