Bahía de descargo

Javascript links

I build left button links by using javascript code and the cygwin utility. So pages under the same level share same links shown as the text boxes of the left.

In order to make use of the solution shown here, you will need to have bash and any text editor of your choice and to profit from the following gawk code.

{ print "document.write('" $0 "');"  } 

As a first step you need to write the html code for your links, as shown here:

<ul class="navbar">
 <li>
    <a href="../ehome.html">Inicio</a>
  </li>
  <li>
    <a href="../edownloads.html">Descargas</a>
  </li>
  <li>
    <a href="../aboutme/efaq.html">FAQ</a>
  </li>
  <li>
    <a href="../ewhatsnew.html">Lo nuevo</a>
  </li>
</ul>

The second step is to convert the html text into javascript code by using the awk file provided. In order to do this you would have to execute following DOS and BASH commands like this:

bash
gawk -fetop.awk jslinks_html_code.txt > jslinks_html_tar.js

By editing the file jslinks_html_tar.js you now have javascript code similar to the following code:

document.write('    <ul class="navbar">');
document.write('      <li>');
document.write('        <a href="../ehome.html">Inicio</a>');
document.write('      </li>');
document.write('      <li>');
document.write('        <a href="../edownloads.html">Descargas</a>');
document.write('      </li>');
document.write('      <li>');
document.write('        <a href="../aboutme/efaq.html">FAQ</a>');
document.write('      </li>');
document.write('      <li>');
document.write('        <a href="../ewhatsnew.html">Lo nuevo</a>');
document.write('      </li>');
document.write('    </ul>');    

You would have to put a back slash before any special character if you want the code to work properly. Finally place the script invocation code at any suitable place of your body tag in your html document.

    <script language="JavaScript" src="../js/fotoren_sh.js" type=
    "text/javascript">
</script>

and voila!, you have the code. Your code would somehow be similar to source of this page.