Codigos De Ayax,php Y Mysql
fdanielmorales27 de Mayo de 2014
563 Palabras (3 Páginas)310 Visitas
<HTML>
<HEAD>
<TITLE>Pantalla Maestra</TITLE>
<LinkRel="STYLESHEET"Href="Estilo.Css"Media="Screen"Type="Text/Css">
<SCRIPTLanguage="JavaScript">
<!--
Function Cargar_contenido(Target,Valor)
{
Var Peticion;
Document.GetElementById(Target).InnerHTML = '<P Class=\"Load\">Cargando...</P>';
Var MyConn = New XHConn();
If (!MyConn) Alert("XMLHTTP No Esta Disponible. Intalo Con Un Navegador Mas Nuevo.");
Peticion=Function(OXML){Document.GetElementById(Target).InnerHTML=OXML.ResponseText;};
MyConn.Connect("Libajax/Detalle.Php?Cvee="+Valor, "GET", "", Peticion);
}
//-->
</SCRIPT>
<ScriptLanguage="JavaScript"Src="Scripts/Js/XHConn.Js"></Script>
</Head>
<Body>
<FormName="Forma"Method="GET"Action="#">
<Center>
<H2><AName=Inic>Captura De Arreglo</A></H2>
Teclee La Clave :
<TableBorder=1Width=50%>
<Tr><TdWidth=10%>
<InputClass="Hidden"Type="Text"Name="Cvee1"Size="5"Maxlength="5"
OnKeypress="If(Event.KeyCode == 13){
Cargar_contenido('Detallecvee1',This.Value);
Return False;
}"></Input></Td>
<Td><DivAlign=CenterId="Detallecvee1"></Div><Td></Tr>
<Tr><TdWidth=10%>
<InputClass="Hidden"Type="Text"Name="Cvee2"Size="5"Maxlength="5"
OnKeypress="If(Event.KeyCode == 13){
Cargar_contenido('Detallecvee2',This.Value);
Return False;
}"></Input></Td>
<Td><DivAlign=CenterId="Detallecvee2"></Div></Td></Tr>
<Tr><TdWidth=10%>
<InputClass="Hidden"Type="Text"Name="Cvee3"Size="5"Maxlength="5"
OnKeypress="If (Event.KeyCode == 13){
Cargar_contenido('Detallecvee3',This.Value);
Return False;
}"></Input></Td>
<Td><DivAlign=CenterId="Detallecvee3"></Div></Td></Tr>
</Table>
<Br/><HrClass=Hidden>
</Center>
</Form>
</BODY>
</HTML>
La función carga_contenido es la encargada de llamar al javascript que es el que tiene la tecnologia Ajax. Este el el codigo del javascript externo XHConn.js
CODIGO 2 JS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 /** XHConn - Simple XMLHTTP Interface - Bfults@Gmail.Com - 2005-04-08 **
** Code Licensed Under Creative Commons Attribution-ShareAlike License **
** Http://Creativecommons.Org/Licenses/By-Sa/2.0/
...