JavaScript

Self HTML selfhtml.org

Objektreferenz
Das node-Objekt
createTextNode() - nodeValue - innerHTML
Wie kann ich erreichen, dass meine Seite im Vollbildmodus angezeigt wird?
Wie kann ich erreichen, dass ein Fenster immer im Vordergrund bleibt?
"Zurück"-Button - window.back()
Seite drucken - window.print()
Optionen bei E-Mail-Verweisen
setInterval()
Style-Eigenschaften
Auf Dateien mit JavaScript zugreifen
cookie
JavaScript Artikel: Cookies in JavaScript
Cookies mit JavaScript/PHP | expand show code | view Example
PHP $_COOKIE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="de">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>JavaScript & PHP Cookies</title>
<script type="text/javascript">
var now = new Date();
var start = Math.floor(now.getTime() / 1000);
var duration = 0;
 
function do_count() {
   now = new Date();
   present = Math.floor(now.getTime() / 1000);
   duration = present - start;
   document.getElementById('jsc_ontent').innerHTML='JavaScript duration = '+duration+' seconds';
   window.setTimeout("do_count()", 1000); 
   document.cookie = "duration=" + duration;
   document.cookie = "now=" + now;
   gespeichert = document.cookie;  
}
window.setTimeout('do_count()', 1000);
</script>
<style type="text/css">
<!--
code {
display:block;
background-color:#ccc;
}
-->
</style>
</head>
<body>
<h1>JavaScript & PHP Cookies</h1>
<div id="jsc_ontent"></div>
<script language="javascript" type="text/javascript">
//reading the cookie content, split entrys to an array
gespeichert = document.cookie.split(";")
cookiegespeichert = new Object();
for(i in gespeichert){
entry = gespeichert[i].split("=");
name = entry[0];
namea = name.split(" ");
name = namea.join("");
cookiegespeichert[name] = String(entry[1]);
}
document.write('Page duration: '+ cookiegespeichert['duration']);
document.write('<br>');
document.write('Page cookie: '+ document.cookie);
document.write('<br>');
document.write('gespeichert: '+ typeof document.cookie);

</script>
<?php
   
if(count($_COOKIE) > 0) {
      echo 
"<p>Letzte Aufenthaltsdauer: {$_COOKIE['duration']} Sekunden at {$_COOKIE['now']} ";
      echo 
" <a href=\"javascript_php_cookie.php\">Link</a></p>";
   }
   else {
      echo 
"<p>Warten Sie ein wenig und klicken Sie dann auf ";
      echo 
"den <a href=\"javascript_php_cookie.php\">Link</a></p>";
   }
?>
<?php show_source
(basename ($_SERVER['PHP_SELF'])); ?>
</body>
</html>

JavaScript einbinden

Um JavaScript einzubinden verwendet man foldendes Tag:
<script language="javascript" type="text/javascript">
<!--
var myscript = "JavaScript";
-->
</script>
Mit type="application/javascript" funktioniert es im IE8 nicht!!!
Ohne language="javascript" funktioniert es im IE6 nicht

» Stockoverflow [Why dosn't IE8 recognize type="application/javascript" in a script?]

JavaScript Tutorials :

Browser Detection with JavaScript
JavaScript Clock server based + stop and play - jQuery clock - server based

pure JavaScript tweening

Dynamische Div Position mit JavaScript (setTimeout)

JavaScript: moving div position with JavaScript

JavaScript Stuff:

Lightbox2

Lightbox is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on all modern browsers.

More Lightboxes: Mister Wong | javascript lightbox

Prototype UI

Prototype UI is a library of User Interface components, based on a common fundation classes, which could be easily used by various web applications.

Create your own iGoogle with Prototype
User Interface Widgets - A list of widgets that people develop for user interfaces

JavaScript & Ajax („Asynchronous JavaScript and XML“)

Ajax Programmierung ermöglicht eine HTTP-Anfrage durchzuführen, ohne die Seite komplett neu laden zu müssen.

Ajax Tutorial: Eine Einführung in Ajax

Ajax Frameworks

Google AJAX Libraries API

jQuery: The Write Less, Do More, JavaScript Library

jQuery documentation
jQuery Selectors
Effects/slideToggle - Example: jQuery slideToggle
Effects/toggle - Example: jQuery toggle

jQuery Tutorials:
jQuery Clone to Add Dynamic Data
JSON Files via Javascript / jQuery
www.think2loud.com - Reading XML with jQuery

jQuery loading dynamic content from json feed
jQuery loading dynamic content from RSS feed
jQuery loading dynamic content (XML) from Google RSS NEWS feed
jQuery loading dynamic content (XML) from YouTube Playlist RSS feed
jQuery clock - server based

script.aculo.us - animation framework
script.aculo.us - getting started
Effect.BlindDown - Example: BlindDown / BlindUp Effect & afterFinish
BlindUp / BlindDown Effect

MooTools - a compact javascript framework

Mootools JavaScript framework
MooTools Demos - Example: Mootools opacity tween
Mootools Documentation

MooTools Extensions:

Delicious JavaScript feed Delicious rss icon

Example from: jQuery Clone to Add Dynamic Data - JSON Files via Javascript / jQuery

»

Tags:

Google News: scripting