HTML and CSS Reference
In-Depth Information
<html>
<head>
<meta name "viewport" content "width default width; user scalable no" />
<title>Foto Betrachter</title>
<link rel "stylesheet" type "text/css" href "style.css">
<script type "text/javascript" charset "utf 8"
src "phonegap.js"></script>
<script type "text/javascript" charset "utf 8">
function onBodyLoad() {
var sourceType;
}
function holeFoto(auswahl) {
// Kamera oder Fotobibliothek?
if (auswahl 'bibliothek') {
sourceWahl 0; }
else {
sourceWahl 1;
}
var options { quality: 50 }
options["sourceType"] sourceWahl;
// Kamera bzw. Fotobibliothek API Aufruf
navigator.camera.getPicture(onSuccess, onFail, options);
}
// Wird nur aufgerufen, wenn ein Bild erfolgreich geholt wurde
function onSuccess(imageData) {
document.getElementById("bild").src "data:image/jpeg;base64," +
imageData;
}
// Wird im Fehlerfall aufgerufen
function onFail(meldung) {
navigator.notification.alert('Folgender Fehler aufgetreten: ' +
meldung);
}
</script>
</head>
<body onload "onBodyLoad()">
<div id "topbar" class "transparent" >
<div id "title">Foto Betrachter</div>
</div>
<form name "sourcetyp">
<fieldset>
<ul class "pageitem">
<li class "button">
<input type "button" value "Foto aus Bibliothek ausw&auml;hlen"
onClick "holeFoto('bibliothek'); return false;">
</li>
Search WWH ::




Custom Search