Monday, October 12, 2009

Selling Human Organs Pros

page elements in JavaScript

All this, of course, to make your life easier and more particularly the management of the website. At each site, are the elements that do not change. The so-called. solids. These are the top example (logos, word root, password, etc.), menu, footer, ads ... these blocks do not change as often as the content, sometimes I just do not change, everything depends on the business side. But the fact is that certain elements must be accessible from the top of each level, eg. Rarely change the header, page logo and even if you are already a surfer needs to see the changes on every page. Same with the menu when we add a new category it should be visible everywhere.

Once, long ago settled the matter of solids just in HTML. Specifically about the inline frame, or page breaks. This is the old method, and even impractical due to positioning.

With it comes the JavaScript scripting language and processed on the client side. You can also solve the problem with PHP and features include or require.

will present here, however, methods based on JS due to processing client side and thus practicality in testing and general accessibility.

Any modern browser is unable to process the script and execute it.



For example, the basic structure will try to explain the ideas of solutions.

\u0026lt;html>

\u0026lt;head>
\u0026lt;title> Fixed page elements \u0026lt;/ title>

\u0026lt;style type="text/css">

body {font-size: 10pt;
font-family: arial;}


td
{border-bottom: 1px solid # 999999;}

\u0026lt;/ style>

\u0026lt;/ head>

\u0026lt;body>
\u0026lt;center>
\u0026lt;table border = "0" style = "border -collapse: collapse; "width =" 800px "> \u0026lt;td width="100%"
\u0026lt;tr>
colspan="2">


\u0026lt;script type =" text / javascript "src = "logo.js"> \u0026lt;/ script>


Sole Sole Sole

</td>
</tr>
<tr>
<td width="30%">


<script type="text/javascript" src="menu.js"></script>


<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Sole Sole


\u0026lt;/ td> \u0026lt;td width="70%">
\u0026lt;small> tresc zależna od podstrony \u0026lt;/ small> \u0026lt;/ td>
\u0026lt;/ tr> ;
\u0026lt;tr>
\u0026lt;td width="100%" colspan="2">


\u0026lt;script type="text/javascript" src="stopka.js"> \u0026lt;/ script> ;



\u0026lt;/ td>
\u0026lt;/ tr>
\u0026lt;/ table>
\u0026lt;/ center>
\u0026lt;/ body>

\u0026lt;/ html>




above HTML code, is a simple page to which are attached files with the *. js files contain JavaScript JS


\u0026lt;script type="text/javascript" src="stopka.js"> \u0026lt;/ script>


put the SCRIPT tag and SRC attribute TYPE. The value of the first is the type of script, in this case, text / javascript. The SRC, a source (source) podajemu path where the JS script.

script after processing will be shown exactly where it is attached.


And what about the JS file?

In this example, the files are attached: logo.js, menu.js, stopka.js

general, as in the files unless you know the place, what we want it to be displayed on the site page.

Thus:

logo.js


document.write ("\u0026lt;h1> \u0026lt;a href='index.html' title='Tytuł strony' alt='Tytuł strony'> , title page, top, logo</a></h1>");


menu.js



document.write("<h4>menu</h4><a href='zakladka.html' title='Zakładka' alt='Zakładka'>Zakładka</a><br><a href='zakladka2.html' title='Zakładka 2' alt='Zakładka 2'>Zakładka 2</a><br><a href='zakladka3.html' title='Zakładka 3' alt='Zakładka 3'>Zakładka 3</a><br><a href = 'zakladka4.html' title = 'Tab 4' alt = 'Tab 4'> Tab 4 \u0026lt;/ a> \u0026lt;br> \u0026lt;a href = 'zakladka5.html' title = 'Tab 5' alt = ' Tab 5 '> Tab 5 \u0026lt;/ a> \u0026lt;br> ");


stopka.js


document.write (" © Copyright 2009 by ld, footer, item, permanent " );



requires a minimum knowledge of JS, and actually only one funckji,:
document.write ();
who it displays on the screen what it każemy. For example, it is plain text, accompanied by simple HTML tags.

As you can see the method is very practical solution. Thanks to having hundreds of pages are generated automatically, replacing the one file you can change the look of each page.

process is simple and well known, but still not used even by those who need it jets.

0 comments:

Post a Comment