The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Link to a page, focus and display text
Jomathr
post May 1 2012, 04:25 PM
Post #1





Group: Members
Posts: 5
Joined: 1-May 12
Member No.: 17,021



Good day to all of you,

I am trying to link to another page, move that freshly loaded page to a specified position and display some hidden text from a link. I have been looking for something like this for a few days now with no success.

I'll try to explain a bit better with code first:

here is what I have so far on the first page where the link is
CODE

<li><img src="http://gatesinnovation.com/GATES/Images/icon1.gif"><p>Quel antivirus choisir?</p><a href="Conseils.html#conseil1" onload="document.getElementById('Conseil1').style.display = ''" <b>Plus</b></a></li>


It does part of what I want to do, it does send me to the other page and focus on the part intented, but as the text is hidden by default it is not showing and I can't display a default one since it might not always be the same text that is displayed.

The last part of this line of code is not working, from "onload" and forward.

here is the part in the target page that controls the text view/hide depending on what I click on that page:
CODE

<li><a href="#conseil1" onclick="document.getElementById('Conseil1').style.display = '';
                                    document.getElementById('Conseil2').style.display = 'none';
                                    document.getElementById('Conseil3').style.display = 'none';
                                    document.getElementById('Conseil4').style.display = 'none'";>Quel antivirus choisir?</a></li>
                                <li><a href="#Conseil2" onclick="document.getElementById('Conseil1').style.display = 'none';
                                    document.getElementById('Conseil2').style.display = '';
                                    document.getElementById('Conseil3').style.display = 'none';
                                    document.getElementById('Conseil4').style.display = 'none'">La copie de sauvegarde?</a></li>
                                <li><a href="#Conseil3" onclick="document.getElementById('Conseil1').style.display = 'none';
                                    document.getElementById('Conseil2').style.display = 'none';
                                    document.getElementById('Conseil3').style.display = '';
                                    document.getElementById('Conseil4').style.display = 'none'">Quel est l'utilité de...</a></li>                                
                                <li><a href="#">Support au bureau</a></li>


Anyone can help me with this? here are the 2 pages
Page with links Gates Innovation - first page
and here is the target page Gates Innovation - Target page

Thank you in advance

Jomathr
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 29th March 2024 - 07:31 AM