Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

CGI jump to an specific anchor ?

by physi (Friar)
on Feb 18, 2003 at 21:36 UTC ( [id://236404]=perlquestion: print w/replies, xml ) Need Help??

physi has asked for the wisdom of the Perl Monks concerning the following question:

Probably not a very perlish question, but maybe a perlish solution for that :
I have a perl-script, which extracts pictures from a database and displays them among each other (each got a specifc anchor tag).
By click on one of them a new page with the 'clicked' picture in large size is displayed.

Now there is a back Button, which refers to the 'multipicture' page.
I like to jump back to exactly the 'last clicked' picture in that column of small-pics.
Normally I can build this backlink by doing a  <a href="http://server.where.ever.de/showallpics.html#lastpic"> back </a> But in my case my showallpics.html is a perl-script (i.e. showallpics.pl).

The question is, how can I jump to a specific anchor in a cgi-script ?

href="http://server.where.ever.de/cgi-bin/showallpics.pl#lastpic"> bac +k </a> href="http://server.where.ever.de/cgi-bin/showallpics.pl?#lastpic"> ba +ck </a>
Both above does not work ...
Any help would be very welcome ;-)

Cheers

-----------------------------------
--the good, the bad and the physi--
-----------------------------------

Replies are listed 'Best First'.
Re: CGI jump to an specific anchor ?
by chromatic (Archbishop) on Feb 18, 2003 at 21:54 UTC
Re: CGI jump to an specific anchor ?
by jasonk (Parson) on Feb 18, 2003 at 21:53 UTC

    # anchors are done completely on the browser side, if the examples you gave don't work then that is entirely the fault of your browser, there is no way to influence this from the CGI script. You might be able to get it to work using javascript, but probably not with perl.

Re: CGI jump to an specific anchor ?
by LAI (Hermit) on Feb 18, 2003 at 21:57 UTC

    I can't see anything wrong with those links (except the missing <a :o) -- that ought to work fine. The stuff after the '#' is grokked by the browser, not the server, so as long as those named anchor tags actually do exist, the link should work.

    Perhaps you need to look at the HTML source and make sure the anchor names aren't getting garbled somehow.

    LAI
    :eof

Re: CGI jump to an specific anchor ?
by physi (Friar) on Feb 18, 2003 at 22:09 UTC
    Thx a lot
    it work's fine now, just a minor bug in my HTML anchor tag :-)

    Cheers

    -----------------------------------
    --the good, the bad and the physi--
    -----------------------------------
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://236404]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-03-28 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found