Hi,
I am trying to enhance the functionality of my web site which is hard with my limited knowledge of web developing.
The idea is the following:
On the main web page there is a show_hide script that looks like this:
On the page there are a number of statements like:
which open particular section in the text.
On another page I have links to the main page:
which open the main page but the visitor has to locate the section of interest by himself and click on it to open it.
I would like to have direct links to sections, but I do not know how to open the main page and run the show_hide scipt in a sigle href statement. Something like:
Is it possible to accomplish this?
Thanks in advance
KT
I am trying to enhance the functionality of my web site which is hard with my limited knowledge of web developing.
The idea is the following:
On the main web page there is a show_hide script that looks like this:
Code:
<script> function show_hide(the_layer)
{
if(document.getElementById(the_layer))
{
if(document.getElementById(the_layer).style.display == 'none')
{
document.getElementById(the_layer).style.display = 'inline';
}
else
{
document.getElementById(the_layer).style.display = 'none';
}
}
}
Code:
<a href="javascript:show_hide('sectionx');">Sectionx</a>
On another page I have links to the main page:
Code:
<a href="mainpage.htm">Main page</a>
I would like to have direct links to sections, but I do not know how to open the main page and run the show_hide scipt in a sigle href statement. Something like:
Code:
<a href="mainpage.htm ????javascript:show_hide('section4');">Main page - Section4</a>
Thanks in advance
KT
Comment