Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageOn 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
Post Follow-up to this messageThanks 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
Post Follow-up to this messageOn 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
Post Follow-up to this messageOn 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.