Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Internal links with cgi
Hi,



I have a link like this. <a href="http://127.0.0.1/link.cgi#word">word</a>.



When I click on the link word, I want the link.cgi to execute and then it
should navigate to the word "word".



Link.cgi is executed and everytime it navigates to the top of the page
instead of navigating to the word "word".

Its not happening for me. Is it valid in cgi or am I missing something.



Thanks,

Ankur





Report this thread to moderator Post Follow-up to this message
Old Post
Ankur Gupta
03-26-05 08:55 PM


Re: Internal links with cgi
On Mar 26, 2005, at 11:41 AM, Ankur Gupta wrote:

> Hi,
>
>
>
> I have a link like this. <a
> href="http://127.0.0.1/link.cgi#word">word</a>.
>
>
>
> When I click on the link word, I want the link.cgi to execute and then
> it
> should navigate to the word "word".
>

This sounds like a job for Javascript. You can probably do this with an
"onload" command and I suppose it's a simple script at that, but I
don't have an example handy. Shouldn't be too hard to find one
though...

Kindest Regards,

--
Bill Stephenson


Report this thread to moderator Post Follow-up to this message
Old Post
Bill Stephenson
03-26-05 08:55 PM


RE: Internal links with cgi
Thanks David and Bill ...
Using named anchors it worked.. I do not care about old versions of
explorers.

--
Ankur

-----Original Message-----
From: David Dorward,,, [mailto:david@us-lot.org] On Behalf Of David Dorward
Sent: Saturday, March 26, 2005 11:17 PM
To: Ankur Gupta
Cc: beginners-cgi@perl.org
Subject: Re: Internal links with cgi

On Sat, Mar 26, 2005 at 11:11:15PM +0530, Ankur Gupta wrote:

> I have a link like this. <a
href="http://127.0.0.1/link.cgi#word">word</a>.

> When I click on the link word, I want the link.cgi to execute and then it
> should navigate to the word "word".

Then wrap that word in a named anchor or (if you are writing modern
code and don't need to support browsers as obsolete as Netscape 4) a
suitable element with an id.

> Its not happening for me. Is it valid in cgi or am I missing something.

All the browser knows is that it has recieved some HTML because it
made a request for an HTTP resource. It doesn't matter how the server
goes about working out what content to send back, CGI, mod_perl, a
static file, its all the same to the client.

--
David Dorward                                      http://dorward.me.uk




Report this thread to moderator Post Follow-up to this message
Old Post
Ankur Gupta
03-27-05 01:55 AM


Re: Internal links with cgi
On 26/03/2005, Ankur Gupta wrote:

> <a href="http://127.0.0.1/link.cgi#word">word</a>.
>
> When I click on the link word, I want the link.cgi to execute and
> then it should navigate to the word "word".

Add a name="word" attribute to you anchor element:

<a name="word" href="....">word</a>

--
felix

Report this thread to moderator Post Follow-up to this message
Old Post
Felix Geerinckx
03-27-05 01:55 AM


Re: Internal links with cgi
On Sat, Mar 26, 2005 at 11:11:15PM +0530, Ankur Gupta wrote:

> I have a link like this. <a href="http://127.0.0.1/link.cgi#word">word</a>.[/color
]

> When I click on the link word, I want the link.cgi to execute and then it
> should navigate to the word "word".

Then wrap that word in a named anchor or (if you are writing modern
code and don't need to support browsers as obsolete as Netscape 4) a
suitable element with an id.

> Its not happening for me. Is it valid in cgi or am I missing something.

All the browser knows is that it has recieved some HTML because it
made a request for an HTTP resource. It doesn't matter how the server
goes about working out what content to send back, CGI, mod_perl, a
static file, its all the same to the client.

--
David Dorward                                      http://dorward.me.uk


Report this thread to moderator Post Follow-up to this message
Old Post
David Dorward
03-27-05 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.