Wikipedia:WikiProject User scripts/Guide/Ajax: Difference between revisions
Content deleted Content added
→Preview: typo |
Alex Smotrov (talk | contribs) rewording XMLHttpRequest |
||
Line 1:
<!--Scripts with [[Ajax (programming)|Ajax]] usually do something without leaving the page.-->
==
Usual approach for creating cross-browser [[XMLHttpRequest]] object is<br />
<code>if (window.XMLHttpRequest) ... else if (window.ActiveXObject) ...</code>.
However, built-in [{{SERVER}}/skins-1.5/common/ajax.js ajax.js] already has this code, so userscripts can simply use
<source lang=javascript>
xmlhttp = sajax_init_object()
</source>
==Data sources==
|