JsHttpRequest
JsHttpRequest es una biblioteca AJAX que permite subir archivos desde el cliente al servidor, entre otras características. se utiliza con JavaScript (ActiveX, …
| JsHttpRequest | ||
|---|---|---|
| Información general | ||
| Tipo de programa | biblioteca JavaScript | |
| Autor | Dmitry Koterov | |
| Enlaces | ||
JsHttpRequest es una biblioteca AJAX que permite subir archivos desde el cliente al servidor, entre otras características. se utiliza con JavaScript (ActiveX, DOM, XMLHttpRequest si está habilitado) y PHP.
Características
Algunas características interesantes de esta biblioteca son:
- Compatibilidad con cualquier navegador web.
- Soporte y transparencia con la codificación de caracteres (incluso con cualquier nacionalidad).
- Soporte para la subida desde el navegador hasta el servidor de archivos sin recargar la página (vía AJAX),
- Soporte total para depurar código PHP.
- Intercambio de estructuras de datos multi-dimensionales (arrays asociativos).
- Selección automática de interfaz AJAX (XMLHttpRequest, <SCRIPT>, <IFRAME>).
- Compatibilidad con la interfaz XMLHttpRequest.
La idea principal de JsHttpRequest es crear una biblioteca de uso simple y transparente para todos los programadores y usos habituales de técnicas programación.
Ejemplo
- Código JavaScript:
JsHttpRequest.query(
'your_ajax_script.php',
{
first: 'Dmitry',
last: 'Koterov',
file: document.getElementById("my_upload_file")
},
function(result, debugMessages) {
document.getElementById("result").innerHTML = result.text;
if (debugMessages) alert(debugMessages);
}
);
- Código PHP:
// PHP code:
require_once "lib/JsHttpRequest.php";
$JsHttpRequest =& new JsHttpRequest("windows-1251");
$_RESULT['text'] = "Hello, {$_REQUEST['first']} {$_REQUEST['last']}!";
echo "Any debug message or even a fatal PHP error";
Enlaces externos
- Página oficial Archivado el 9 de noviembre de 2008 en Wayback Machine.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.