PageSourceSearch

https://bostonguide.com/js/akisha.ajax.js

js bostonguide.com collected 2026-10-02 12:12:48 UTC 7,553 bytes, 273 lines download raw bytes

1/**
2* aki ajax v1.4.4: Funciones simplificadas de ajax - http://joemakina.com.ar/
3*
4* aki ajax (c) 2007 Juan Manuel Barruffaldi ([email protected]) bajo las licencias (MIT License y LGPL Licence)
5* http://www.opensource.org/licenses/mit-license.php
6*
7
8goAJAX(xW,xF, xP,Exec,Load)
9
10xW-> es el div
11xF -> es el archivo php
12xP -> son los parametros deforma algo=12&asgo=34&etc=
13Exec -> Es una funcion para ejecutar cuando este lista la solicitud (util para ajax dinĂ¡mico=
14Load -> un String para el texto cargando
15solo los 2 primeros parametros son necesarios
16
17*/
18
19
20var strCargando='<p align="center">loading...</p>';
21var navegador=navigator.appName;
22var ie=document.all;
23var dom=GetId;
24var ns4=document.layers;
25function getId(Id){
26	return document.getElementById(Id);
27	}
28function GetId(Id){
29	return document.getElementById(Id);
30}
31function get(Id){
32	return document.getElementById(Id);
33}
34function putIn(id,html){
35	get(id).innerHTML=html;
36}
37function putInVal(id, val){
38	get(id).value=val;
39}
40
41
42
43	function goAJAX(xW, xF, xP, Exec, Load, replOnStart, replOnEnd){
44
45		if ((Load=='')||(!isDefined(Load))){
46			Load=strCargando;
47		} else {
48			Load=Load;
49		}
50
51		var peticion = new Ajax.Request(xF,
52		{
53			method:'post',
54			postBody: xP,
55			onCreate:
56				function () {
57					if(((!isDefined(replOnStart))||(replOnStart==''))&& xW!='' && xW!=null){
58						$(xW).innerHTML = Load;
59					}
60				},
61			onSuccess:
62				function(response) {
63
64					var respuesta 	= (response.responseJSON)?response.responseJSON.content:response.responseText;
65
66					if(((replOnEnd=='')||(!isDefined(replOnEnd)))&& xW!=''&& xW!=null && isDefined(xW)){
67						try{$(xW).innerHTML = respuesta;}catch(e){alert(e);}
68					}
69
70					eval(Exec);
71				},
72			onFailure:
73				function() {
74					alert("Error:\n"+File);
75				}
76		});
77	}
78
79
80
81function isDefined(variable)
82{
83	return (!(!( variable||false )))
84}
85function strlen(strVar)
86{
87	return(strVar.length)
88}
89function diplayOverlay(){
90	var objDiv = GetId("sOverlay")
91	objDiv.style.display = "";
92	if (navegador=="Microsoft Internet Explorer"){
93		objDiv.style.height=document.documentElement.clientHeight*6;
94	}else{
95		objDiv.style.height=3* window.innerHeight+'px';
96	}
97}
98function winajax(tit,w,h,f,p,Exec,Load){/*Function winajax and goAJAX under LGPL Licence*/
99	GetId('btnCerrarVtna').style.display='';
100	var oVtna = GetId("sVentana");
101	GetId("TitVna").innerHTML=tit;
102	oVtna.style.width=w+'px';
103	oVtna.style.height=h+'px';
104	//centet top window
105	scroll_top=((ie)? truebody().scrollTop : window.pageYOffset)+100;
106	if (navegador=="Microsoft Internet Explorer"){
107		oVtna.style.top=scroll_top;
108		oVtna.style.left=(document.body.offsetWidth/2)-(w/2);
109	}else{
110
111		oVtna.style.top=scroll_top+'px';
112		oVtna.style.left='30%';
113	}
114	diplayOverlay();
115	oVtna.style.display = "";
116	goAJAX('ContentVentana',f,p,Exec,Load);
117}
118function truebody(){
119	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
120}
121	function OcultarVtna(){
122		if ($("sOverlay")) {
123			var objDiv = GetId("sOverlay");
124			objDiv.style.display = "none";
125		}
126		if ($("sVentana")) {
127			var objDiv = GetId("sVentana");
128			objDiv.style.display = "none";
129		}
130		if ($('winConfigureModule')) {
131			Windows.close("winConfigureModule");
132		}
133	}//fin goajax
134
135function str_replace(search, replace, subject) {
136	return subject.split(search).join(replace);
137}
138function akiSfrm(frm){
139	o = document.forms[frm].elements[0];
140	var xP=o.name+'='+encodeURIComponent(str_replace('+', 'kknd', o.value));
141	var sxP=o.name+'='+encodeURIComponent(str_replace('+', 'kknd', o.value));
142	for (i=1; i<document.forms[frm].elements.length; i++) {
143		ob = document.forms[frm].elements[i];
144		if (ob.checked){
145			xP = xP + '&' + ob.name + '=' + 'ok'+encodeURIComponent(ob.value);
146			sxP = sxP + '\n > ' + ob.name + '=' + 'ok'+encodeURIComponent(ob.value);
147		}else{
148			xP = xP + '&' + ob.name + '=' + encodeURIComponent(str_replace('+', 'kknd', ob.value));
149			sxP = sxP + '\n > ' + ob.name + '=' + encodeURIComponent(str_replace('+', 'kknd', ob.value));
150		}
151	}
152	//alert(sxP);
153	return xP;
154}
155
156function centerDivWindow(WindowId){
157	var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
158	var dsocleft=document.all? iebody.scrollLeft : pageXOffset
159	var dsoctop=document.all? iebody.scrollTop : pageYOffset
160	oVtna = GetId(WindowId);
161	oVtna.style.position="absolute";
162	var vh=str_replace('px','',oVtna.style.height);
163	var vw=str_replace('px','',oVtna.style.width);
164	if (vw<1){vw=(iebody.clientWidth/2);}
165	if (vh<1){vh=(iebody.clientHeight/2);}
166
167	var theTop =(((iebody.clientHeight/2)+dsoctop)-((vh/2)));
168
169	if(theTop<1){theTop='100';}
170	oVtna.style.top = theTop + 'px';
171	oVtna.style.left=(((iebody.clientWidth/2)+dsocleft)-((vw/2)))+'px';
172}
173
174
175function akShowHide(div){
176	if (get(div).style.display==''){
177		get(div).style.display='none';
178	}else{
179		get(div).style.display='';
180	}
181	return false;
182}
183
184function importJs(src){
185  var scriptElem = document.createElement('script');
186  scriptElem.setAttribute('src',src);
187  scriptElem.setAttribute('type','text/javascript');
188  document.getElementsByTagName('head')[0].appendChild(scriptElem);
189}
190
191function eventRefresh() {
192	window.location.reload();
193}
194/* MAURO
195function sendPollInfo(){
196
197	if (GetId('q3_com').value != "" && GetId('q4_com').value != "" && GetId('q6_com').value != "") {
198
199		info = "q1="+encodeURIComponent(GetId('q1_h').value);
200		info += "&q2="+encodeURIComponent(GetId('q2_h').value);
201		info += "&q5="+encodeURIComponent(GetId('q5_h').value);
202		info += "&q7="+encodeURIComponent(GetId('q7_h').value);
203		info += "&q9="+encodeURIComponent(GetId('q9_h').value);
204
205		info += "&q1_com="+encodeURIComponent(GetId('q1_com').value);
206		info += "&q2_com="+encodeURIComponent(GetId('q2_com').value);
207		info += "&q3_com="+encodeURIComponent(GetId('q3_com').value);
208		info += "&q4_com="+encodeURIComponent(GetId('q4_com').value);
209		info += "&q5_com="+encodeURIComponent(GetId('q5_com').value);
210		info += "&q6_com="+encodeURIComponent(GetId('q6_com').value);
211		info += "&q7_com="+encodeURIComponent(GetId('q7_com').value);
212		info += "&q9_com="+encodeURIComponent(GetId('q9_com').value);
213
214		info += "&name="+encodeURIComponent(GetId('name').value);
215		info += "&sex="+encodeURIComponent(GetId('sex').value);
216		info += "&email="+encodeURIComponent(GetId('email').value);
217		info += "&age="+encodeURIComponent(GetId('age').value);
218		info += "&address="+encodeURIComponent(GetId('address').value);
219
220		goAJAX('poll_div','poll_form.php',info);
221		return false;
222
223	} else {
224
225		alert("Please, complete all fields.");
226		if (GetId('q3_com').value == "") {
227			GetId('q3_com').focus();
228		} else if (GetId('q4_com').value == "") {
229			GetId('q4_com').focus();
230		} else if (GetId('q6_com').value == "") {
231			GetId('q6_com').focus();
232		}
233
234		return false;
235
236	}
237}
238
239function sendContestInfo(){
240
241	if (GetId('email').value == "" || GetId('fullname').value == "" || GetId('year').value == "" || GetId('zip').value == "" || GetId('guess').value == "") {
242
243		alert("Please, complete all fields.");
244
245		return false;
246		exit;
247	}
248
249	if (GetId('TermCheck').value == 0) {
250
251		alert("Please, agree to the terms of the Express Milwaukee");
252
253		return false;
254		exit;
255	}
256
257	info = "email="+GetId('email').value;
258	info += "&name="+GetId('fullname').value;
259	info += "&year="+GetId('year').value;
260	info += "&zip="+GetId('zip').value;
261	info += "&guess="+GetId('guess').value;
262
263	info += "&r_emails="+GetId('r_emails').value;
264	info += "&r_offers="+GetId('r_offers').value;
265
266	alert(GetId('TermCheck').value);
267	goAJAX('poll_div2','contest.php',info);
268	return false;
269
270
271}
272
273 */

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.