Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
<html>
<head>
<title>Schwarzes Brett</title><link href="../../css/content_ie.css" type=text/css rel=stylesheet>
<script type="text/javascript">
var adOpenDynamic = 2;
var adLockOptimistic = 3;
/* Path of database.
If you put the database "Inventory.mdb" in different location,
you need to specify the correct path to this variable.
But When you are running the webpage from Browsers only,
you should use this keyword "window.location.pathname" for getting
the current location. But If you are using FrontPage,
you hav to specity the static path.
*/
var strDbPath = "http://meinServer/SchwarzesBrett.mdb";
/*
Here is the ConnectionString for Microsoft Access.
If you wanna use SQL or other databases, you hav
to change the connection string..
eg: SQL => var conn_str = "Provider=sqloledb; Data Source=itdev;" +
"Initial Catalog=pubs; User ID=sa;Password=yourpassword";
*/
var conn_str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDbPath;
function getAdoDb(strAdoType){
if (window.ActiveXObject){
return new ActiveXObject(strAdoType);
} else{
return new ActiveXObject(strAdoType);
}
}
function showEntries(){
try{
var strHtml ="";
//Database Connection
var conn = getAdoDb("ADODB.Connection");
conn.open(conn_str, "", "");
//Recordset
var rs = getAdoDb("ADODB.Recordset");
strQuery = "SELECT Name,Telefonnummer,Beschreibung FROM SchwarzesBrett";
rs.open(strQuery, conn, adOpenDynamic, adLockOptimistic);
if(!rs.bof){
rs.MoveFirst();
while(!rs.eof) {
strHtml += "<tr>";
strHtml += "<td class='content'>Name</td>";
strHtml += "<td class='content'>" + rs.fields(0).value + "</td>";
strHtml += "<td class='content'>Telefonnummer</td>";
strHtml += "<td class='content'>" + rs.fields(1).value + "</td>";
strHtml += "</tr><tr>"
strHtml += "<td colspan='4' class='content'>" + rs.fields(2).value + "</td>";
strHtml += "</tr>";
rs.MoveNext();
}
} else{
//No Records.
strHtml += "<tr colspan=4><td align=center><font color=red>No Records.</font></td></tr>";
}
conn.close();
document.write(strHtml);
}catch(ex){
alert(ex.message);
}
}
</script>
</head>
<body>
<table width=800 border="0">
<tr height="50">
<td align="center" bgcolor=#C0C0C0>
<span class="heading">
<span>Schwarzes Brett</span>
</td>
</tr>
<tr>
<td class="content">
Hier haben Sie die Möglichkeit Dinge Anzubieten, zu verkaufen etc.
</td>
</tr>
</table>
<table width=400 border=0>
<script language="JavaScript">
showEntries();
</script>
</table>
</body>
</html>