Forum Moderators: phranque

Message Too Old, No Replies

Link to a named anchor in a hidden layer

Link to a named anchor in a hidden layer

         

vmarino

2:30 pm on Sep 27, 2007 (gmt 0)

10+ Year Member



I have a need to create a link to a named anchor within a hidden layer on another page. If I use the standard [url.com#anchor,...] it takes me to the page, but the hidden layer is still hidden. Any ideas on how I can get around this?

Thanks!

jtara

4:16 pm on Sep 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Er, unhide the layer?

There's nothing to "get around". It's doing what it's supposed to do. You defined the layer as hidden.

You can unhide it with Javascript. I guess in this case the way to go would be to have a Javascript onload function check the referrer, and if it's the page that contains the link, unhide the layer.

But, of course, this isn't going to work if the user has Javascript disabled. So, it would be better to use a server-side script instead of static HTML for the page with the hidden layer.

Better yet, why not do something dead simple. Have you considered having two versions of the page, instead of using a hidden layer? Why complicate things?

vmarino

4:26 pm on Sep 27, 2007 (gmt 0)

10+ Year Member



Thanks for your response. I have considered a separate page and will probably go that route. The problem with checking the referring page is that there could be multiple links from the referring page to one of the layers on the referred to page. Not sure if that made sense...

Thanks again! I'm starting on separate pages...

Vickie