Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Action before clicking a link

Reply
Thread Tools

Action before clicking a link

 
 
lg
Guest
Posts: n/a
 
      05-08-2007
I have the following code (scaled down from complete code):


[snip]
print "Press link below to go to next level";
print '<form action="http://thisandthat.com" method="post">';
print "</form>";
[snip]

When user clicks the link he then goes to the page link point to.
I would like to save info that the user has clicked the link.
How do I do that?
 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      05-08-2007
lg <(E-Mail Removed)> wrote:

> Subject: Action before clicking a link



before clicking.


> When user clicks the link



after clicking.

Which is it?


> How do I do that?



In the first case, by accurately predicting the future.

In the later case, by putting the appropriate code it the
resource at the end of the link.


--
Tad McClellan SGML consulting
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      05-08-2007
lg wrote:
> I have the following code (scaled down from complete code):

[snip]
> print "Press link below to go to next level";
> print '<form action="http://thisandthat.com" method="post">';
> print "</form>";
> [snip]
>
> When user clicks the link he then goes to the page link point to.
> I would like to save info that the user has clicked the link.
> How do I do that?


Yor print() statements look correct to me. Beside that is there anything
else related to Perl that you like to discuss?

jue


 
Reply With Quote
 
Brian Wakem
Guest
Posts: n/a
 
      05-08-2007
lg wrote:

> I have the following code (scaled down from complete code):
>
>
> [snip]
> print "Press link below to go to next level";
> print '<form action="http://thisandthat.com" method="post">';
> print "</form>";
> [snip]
>
> When user clicks the link he then goes to the page link point to.
> I would like to save info that the user has clicked the link.
> How do I do that?



Point to a script which redirects after logging.


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
 
Reply With Quote
 
Xicheng Jia
Guest
Posts: n/a
 
      05-08-2007
On May 8, 5:36 am, lg <(E-Mail Removed)> wrote:
> I have the following code (scaled down from complete code):
>
> [snip]
> print "Press link below to go to next level";
> print '<form action="http://thisandthat.com" method="post">';
> print "</form>";
> [snip]
>
> When user clicks the link he then goes to the page link point to.
> I would like to save info that the user has clicked the link.
> How do I do that?


my question:
1) There is no link, just an empty form
2) Can you use 'GET' instead of 'POST'

You might also want to check Javascript's onChange handler if you dont
like a 'submit' button

Regards,
Xicheng



 
Reply With Quote
 
lg
Guest
Posts: n/a
 
      05-09-2007
Brian Wakem <(E-Mail Removed)> wrote:

>lg wrote:
>
>> I have the following code (scaled down from complete code):
>>
>>
>> [snip]
>> print "Press link below to go to next level";
>> print '<form action="http://thisandthat.com" method="post">';
>> print "</form>";
>> [snip]
>>
>> When user clicks the link he then goes to the page link point to.
>> I would like to save info that the user has clicked the link.
>> How do I do that?

>
>
>Point to a script which redirects after logging.


Thank for the tip.
How do I do the redirecting?
 
Reply With Quote
 
Brian Wakem
Guest
Posts: n/a
 
      05-09-2007
lg wrote:

> Brian Wakem <(E-Mail Removed)> wrote:
>
>>lg wrote:
>>
>>> I have the following code (scaled down from complete code):
>>>
>>>
>>> [snip]
>>> print "Press link below to go to next level";
>>> print '<form action="http://thisandthat.com" method="post">';
>>> print "</form>";
>>> [snip]
>>>
>>> When user clicks the link he then goes to the page link point to.
>>> I would like to save info that the user has clicked the link.
>>> How do I do that?

>>
>>
>>Point to a script which redirects after logging.

>
> Thank for the tip.
> How do I do the redirecting?



http://search.cpan.org/~lds/CGI.pm-3...RECTION_HEADER


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      05-09-2007
lg <(E-Mail Removed)> wrote:

> How do I do the redirecting?



Your Questions is Asked Frequently:

perldoc -q redirect

How do I redirect to another page?


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
lg
Guest
Posts: n/a
 
      05-09-2007
Brian Wakem <(E-Mail Removed)> wrote:

>lg wrote:
>
>> Brian Wakem <(E-Mail Removed)> wrote:
>>
>>>lg wrote:
>>>
>>>> I have the following code (scaled down from complete code):
>>>>
>>>>
>>>> [snip]
>>>> print "Press link below to go to next level";
>>>> print '<form action="http://thisandthat.com" method="post">';
>>>> print "</form>";
>>>> [snip]
>>>>
>>>> When user clicks the link he then goes to the page link point to.
>>>> I would like to save info that the user has clicked the link.
>>>> How do I do that?
>>>
>>>
>>>Point to a script which redirects after logging.

>>
>> Thank for the tip.
>> How do I do the redirecting?

>
>
>http://search.cpan.org/~lds/CGI.pm-3...RECTION_HEADER


Thank you. I got it working.
 
Reply With Quote
 
Joe Smith
Guest
Posts: n/a
 
      05-10-2007
lg wrote:

> When user clicks the link he then goes to the page link point to.
> I would like to save info that the user has clicked the link.
> How do I do that?


Have the link invoke a CGI that does a re-direct.
That info will show up in your access_log.

http://www.inwap.com/mybin/list-files.pl?goto.cgi

-Joe
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set link's "visited" property/pseudo-class without clicking on the link friday13 Javascript 3 04-28-2007 12:14 AM
how to trigger an action by clicking in a field of detailsview? André ASP .Net 2 06-23-2006 02:09 PM
I want to create a link "e-mail this page to a friend" on clicking this link i want to send the URL of that current page to a friend pavi Javascript 0 01-13-2006 12:10 PM
wrong action when clicking on ".jar" file zutroi Firefox 2 08-22-2005 11:40 AM
I want to be able to access the internet by opening my browser and not right clicking and then clicking connect. James Johnson Computer Support 1 05-15-2004 03:40 AM



Advertisments