Home Back
     
 

 

 

Basismap Intra- Internet programmeren
Categorie Programmeren Eenvoudig data-systeem voor website
Datasysteem voor website
Klasseersysteem : naam1.htm naam2.htm ....... naamx.htm
Samenstellen van de bestandsnaam : Naam + recnr + extentie (zie javascript)

Gestest op IE 6.0 Netscape 7.2 - browsers en Linux - Slackware 10.0
Systeem gebruikt op website OXFAM pomperinge.
Demo :

http://www.tribuun.com/Kantoren/demos/pwdatasys.htm
 
Code:

<html>
<head>
<title>Witte Wijn</title>
<link REL="stylesheet" TYPE="text/css" href="stijl.css">   
   
<script language=javascript>
//author : piet willems [pwProTech - Tribuun]

//algemene variabelen  bladconfiguratie
//-------------------------------------
recnr=1 //start met record 1
maxrec=6 //aantal records - 1
bladnaam="choco" //bestandsnaam = bladnaam + het recordnummer + de extentie
extentie=".htm"
bladtitel="Titel pagina"
//einde configuratie -------------------------------------------------------


//select browser
var IE;   // Explorer
var N;    // Netscape
var N7;   // Netscape 7

if (document.all){IE=1;N=0;N7=0;}
else if (document.layers){IE=0;N=1;N7=0;}
else if (document.getElementById){IE=0;N=0;N7=1;}


function init()
{
startschakel="<a class=hoofdschakel href= '" + bladnaam + recnr + extentie + "' target='hoofd'>Inhoudstafel " + bladtitel + "</a>"
window.document.getElementById('RecNr').innerHTML=recnr;
window.document.getElementById('hoofding').innerHTML=bladtitel;
window.document.getElementById('hoofdschakel').innerHTML=startschakel;
}

function rec_volgend()
{
window.document.getElementById('naarvolgend').className='knopdruk' ;
if (recnr <=maxrec){
recnr ++;
window.document.getElementById('RecNr').innerHTML=recnr;
hoofd.location.href=bladnaam + recnr + extentie;
}
else
{window.document.getElementById('info').innerHTML="einde lijst";}
}


function rec_vorig()
{
window.document.getElementById('naarvorig').className='knopdruk';
if (recnr >1){recnr --};
window.document.getElementById('RecNr').innerHTML=recnr;
hoofd.location.href=bladnaam + recnr + extentie;
}

function muisdruk(id,tekst,klas)
{
window.document.getElementById(id).className=klas;

}
function muisuit(id,tekst,klas)
{
window.document.getElementById(id).className=klas;
window.document.getElementById('info').innerHTML=tekst;
}
function muisover(id,tekst,klas)
{
window.document.getElementById(id).className=klas;
window.document.getElementById('info').innerHTML=tekst;
}
</script>

<style TYPE="text/css">
a {text-decoration:none}
.mini{text-align: right;font-family: Verdana; font-size: 8pt;text-padding:-1px; }
.titel{float: left;font-family: Tahoma; color:#FFFFFF; font-size: 8pt; font-weight: bold;}
.knopschakel{text-decoration:none;font-family: Tahoma; color:#647C9B; font-size: 8pt; font-weight: bold; border: 1px solid #788FA3; background-color: #F3F5F8}
.knopvolgend{font-family: Tahoma; color:#647C9B; font-size: 8pt; font-weight: bold; border: 1px solid #788FA3; background-color: #F3F5F8}
.knopvorig{font-family: Tahoma; color:#647C9B; font-size: 8pt; font-weight: bold; border: 1px solid #788FA3; background-color: #F3F5F8}
.knoprecnr{font-family: Tahoma; color:#647C9B; font-size: 8pt; font-weight: bold; border: 1px solid #788FA3; background-color: #F3F5F8}
.knopover{font-family: Tahoma; font-size: 8pt; font-weight: bold; border: 1px solid #000000; background-color: #FFFFFF;cursor:hand}
.knopdruk{font-family: Tahoma; font-size: 8pt; font-weight: bold; border: 1px solid #000000; background-color: #FF0000}
</style>

<base target="hoofd">

</head>

<body leftmargin="0" topmargin="0" onload="init()" link="#000080" vlink="#000080" alink="#000080" style="text-align: left">
<BASEFONT FACE="Verdana">



<div align="center">



<table border="0" width="96%" cellpadding="0">
   <tr>
      <td class="titel" id=hoofding>titel</td>
        <td class="mini" id=info id=hoofding width="116"><font color="#FFFFFF">info</font></td>
      <td width="7"></td>
     </tr>
</table>

</div>
<div align="center">

<table border="0" width="97%" cellpadding="0" height="19">
   <tr>
      <td class="knopschakel" id=hoofdschakel align="center"  height="15">
      <a href= "choco1.htm" target="hoofd">Inhoudstafel schakel</a>   </td>
      <td class="knoprecnr" width="40" align="center" height="15">Blad</td>
         <td id=RecNr class=knoprecnr width="40" align="center" height="15">0</td>
         <td class="knopvorig" id=naarvorig width="30" align="center"  height="15" alt="Vorig"         
         onmousedown="rec_vorig()"           
         onmouseover ="muisover('naarvorig','Vorige','knopover')"         
         onmouseOut="muisuit('naarvorig','','knopvorig')">«</td>
        <td class="knopvolgend" id=naarvolgend width="30" align   ="center"  height="15" alt="Volgend"      
        onmousedown="rec_volgend()"         
        onmouseover="muisover('naarvolgend','Volgende','knopover')"       
        onmouseOut="muisuit('naarvolgend','','knopvolgend')">»</td>
        <td width="7"></td>
     </tr>
</table>
      
</div>
      
<p style="text-align: center">&nbsp;
<iframe  name="hoofd"  src="choco1.htm" width="96%" height = "80%" frameborder=0 style="position:absolute;left=17px;top:38px" target="hoofd" align="left"></iframe>

   
</p>

   
</body>
</html>
 
 

Copyright (c) 2005 :: willems piet