Ajax: Unterschied zwischen den Versionen

Aus Flinkwiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „ ---- * [https://premium.wpmudev.org/blog/using-ajax-with-wordpress/ Using Ajax with Wordpress] <nowiki> add_action( 'wp_enqueue_scripts', 'ajax_test_enq…“)
 
 
(11 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
<div align="right"><big>'''[https://flinkwiki.de/index.php?title=Kategorie:Alle_Seiten Seitenübersicht]'''</big></div>
  
  
 +
Asynchronous JavaScript And XML
  
 +
https://de.wikibooks.org/wiki/Websiteentwicklung:_AJAX:_Erstes_Programm
  
 
----
 
----
 +
 +
== XMLHttpRequest ==
 +
 +
XMLHttpRequest ist ein JavaScript Objekt, das von Microsoft entwickelt und von Mozilla, Apple, und Google übernommen wurde. Es wird derzeit im W3C standardisiert. Es bietet einen einfachen Weg, Daten von einem URL zu erhalten. Trotz seines Namens kann man mit XMLHttpRequest jede Art von Daten laden, nicht nur XML, und es unterstützt auch andere Protokolle als HTTP (inklusive file und ftp).
 +
Eine Instanz von XMLHttpRequest erzeugt man ganz einfach so:
 +
var myRequest = new XMLHttpRequest();[https://developer.mozilla.org/de/docs/Web/API/XMLHttpRequest]
 +
 +
 +
XMLHttpRequest.readyState
 +
 +
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState
 +
 +
----
 +
 +
== Ajax in WordPress ==
  
 
* [https://premium.wpmudev.org/blog/using-ajax-with-wordpress/ Using Ajax with Wordpress]
 
* [https://premium.wpmudev.org/blog/using-ajax-with-wordpress/ Using Ajax with Wordpress]
Zeile 25: Zeile 43:
  
 
----
 
----
 +
 +
== Links ==
  
 
* https://www.jackreichert.com/2013/03/using-ajax-in-wordpress-development-the-quickstart-guide/
 
* https://www.jackreichert.com/2013/03/using-ajax-in-wordpress-development-the-quickstart-guide/
Zeile 34: Zeile 54:
 
* https://www.w3schools.com/jquery/ajax_getjson.asp
 
* https://www.w3schools.com/jquery/ajax_getjson.asp
  
* https://premium.wpmudev.org/blog/using-ajax-with-wordpress/ Using Ajax with Wordpress
+
* https://premium.wpmudev.org/blog/using-ajax-with-wordpress/ Using Ajax with WordPress
 +
 
 +
* https://jsonplaceholder.typicode.com/ gibt JSON-Testdaten
 +
 
 +
 
 +
----
  
[[Kategorie: Alle Seiten]]
+
[[Kategorie: Alle Seiten]] | [[Kategorie: Internet]] | [[Kategorie: Programmierung]] | [[Kategorie: Web]]

Aktuelle Version vom 15. August 2020, 21:49 Uhr

Seitenübersicht


Asynchronous JavaScript And XML

https://de.wikibooks.org/wiki/Websiteentwicklung:_AJAX:_Erstes_Programm


XMLHttpRequest

XMLHttpRequest ist ein JavaScript Objekt, das von Microsoft entwickelt und von Mozilla, Apple, und Google übernommen wurde. Es wird derzeit im W3C standardisiert. Es bietet einen einfachen Weg, Daten von einem URL zu erhalten. Trotz seines Namens kann man mit XMLHttpRequest jede Art von Daten laden, nicht nur XML, und es unterstützt auch andere Protokolle als HTTP (inklusive file und ftp). Eine Instanz von XMLHttpRequest erzeugt man ganz einfach so:

var myRequest = new XMLHttpRequest();[1]


XMLHttpRequest.readyState

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState


Ajax in WordPress

add_action( 'wp_enqueue_scripts', 'ajax_test_enqueue_scripts' );
function ajax_test_enqueue_scripts() {
	if( is_single() ) {
		wp_enqueue_style( 'love', plugins_url( '/love.css', __FILE__ ) );
	}

	wp_enqueue_script( 'love', plugins_url( '/love.js', __FILE__ ), array('jquery'), '1.0', true );

	wp_localize_script( 'love', 'postlove', array(
		'ajax_url' => admin_url( 'admin-ajax.php' )
	));

}



Links



| | |