Rev 406 | Rev 431 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
53 | jmachado | 1 | /** |
163 | jmachado | 2 | * |
3 | * AJAX Functions |
||
4 | * |
||
5 | * This code is protected under GNU LGPL License |
||
6 | * |
||
7 | * @author Jorge Machado |
||
8 | * @date April 2008 |
||
9 | **/ |
||
1 | fvelez | 10 | |
53 | jmachado | 11 | /** |
12 | * Starts XMLHTTP Ajax request |
||
13 | * |
||
14 | * @author Jorge Machado |
||
15 | * @date April 2008 |
||
16 | * |
||
17 | * params: |
||
18 | * @params HTTP GET Parameters for query string |
||
19 | * @xmlHttpRequest request |
||
20 | * @id target element |
||
21 | * @stateChanged target function |
||
22 | * @innerPhrase to put while waiting for response |
||
23 | * @navjsp requested jsp |
||
24 | */ |
||
25 | function startRequest(xmlHttpRequest,params,id,stateChanged,innerPhrase,navjsp) |
||
26 | { |
||
165 | jmachado | 27 | var contentType = "application/x-www-form-urlencoded; charset=UTF-8"; |
53 | jmachado | 28 | if(innerPhrase != '') |
29 | getObjectById(id).innerHTML = innerPhrase; |
||
30 | if (xmlHttpRequest==null) |
||
31 | { |
||
32 | alert ("Browser does not support HTTP Request"); |
||
33 | return; |
||
34 | } |
||
165 | jmachado | 35 | var finalParams = ""; |
430 | jmachado | 36 | var url = location.href.substring(0,location.href.indexOf('/',location.href.indexOf("://")+3)) + navjsp; |
53 | jmachado | 37 | if(params != null && params.length > 0) |
38 | { |
||
165 | jmachado | 39 | //url=url+"?"+ params; |
40 | //url=url+"&sid="+Math.random(); |
||
41 | url=url+"?sid="+Math.random(); |
||
42 | var paramsArray = params.split("&"); |
||
43 | var i; |
||
44 | var union = ''; |
||
430 | jmachado | 45 | for(i = 0; i < paramsArray.length; i++) |
46 | { |
||
165 | jmachado | 47 | var parameter = paramsArray[i].split("="); |
48 | if(parameter.length == 2) |
||
49 | { |
||
50 | finalParams += union + parameter[0] + '=' + encodeURIComponent(parameter[1]); |
||
51 | union = '&'; |
||
52 | } |
||
53 | } |
||
53 | jmachado | 54 | } |
55 | else |
||
56 | { |
||
57 | url=url+"?sid="+Math.random(); |
||
58 | } |
||
165 | jmachado | 59 | |
53 | jmachado | 60 | xmlHttpRequest.onreadystatechange=stateChanged; |
165 | jmachado | 61 | xmlHttpRequest.open("POST",url,true); |
62 | xmlHttpRequest.setRequestHeader("Content-Type", contentType); |
||
63 | xmlHttpRequest.send(finalParams); |
||
53 | jmachado | 64 | } |
1 | fvelez | 65 | |
53 | jmachado | 66 | /** |
67 | * Return an HTML element given ID |
||
68 | * |
||
69 | * @author Jorge Machado |
||
70 | * @date April 2008 |
||
71 | * |
||
72 | * params: |
||
73 | * @objectId required object |
||
74 | */ |
||
75 | function getObjectById(objectId) |
||
76 | { |
||
77 | // cross-browser function to get an object's style object given its id |
||
78 | try |
||
79 | { |
||
80 | if(document.getElementById && document.getElementById(objectId)) |
||
1 | fvelez | 81 | { |
82 | // W3C DOM |
||
53 | jmachado | 83 | return document.getElementById(objectId); |
84 | } |
||
85 | else if (document.all(objectId)) |
||
86 | { |
||
1 | fvelez | 87 | // MSIE 4 DOM |
53 | jmachado | 88 | return document.all(objectId); |
89 | } |
||
90 | else if (document.layers && document.layers[objectId]) |
||
91 | { |
||
1 | fvelez | 92 | // NN 4 DOM.. note: this won't find nested layers |
53 | jmachado | 93 | return document.layers[objectId]; |
1 | fvelez | 94 | } |
53 | jmachado | 95 | else |
1 | fvelez | 96 | { |
97 | return false; |
||
98 | } |
||
53 | jmachado | 99 | } |
100 | catch(e) |
||
101 | { |
||
102 | return false; |
||
103 | } |
||
1 | fvelez | 104 | } |
105 | |||
406 | jmachado | 106 | |
107 | function getObjectByStartId(objectId) |
||
108 | { |
||
109 | // cross-browser function to get an object's style object given its id |
||
110 | try |
||
111 | { |
||
112 | for(var element in document.elements) |
||
113 | { |
||
114 | alert(element.value); |
||
115 | } |
||
116 | // if(document.getElementById && document.getElementById(objectId)) |
||
117 | // { |
||
118 | // // W3C DOM |
||
119 | // return document.getElementById(objectId); |
||
120 | // } |
||
121 | // else if (document.all(objectId)) |
||
122 | // { |
||
123 | // // MSIE 4 DOM |
||
124 | // return document.all(objectId); |
||
125 | // } |
||
126 | // else if (document.layers && document.layers[objectId]) |
||
127 | // { |
||
128 | // // NN 4 DOM.. note: this won't find nested layers |
||
129 | // return document.layers[objectId]; |
||
130 | // } |
||
131 | // else |
||
132 | // { |
||
133 | // return false; |
||
134 | // } |
||
135 | } |
||
136 | catch(e) |
||
137 | { |
||
138 | return false; |
||
139 | } |
||
140 | } |
||
141 | |||
92 | jmachado | 142 | function hide(id,showId) |
143 | { |
||
223 | jmachado | 144 | hideOne(id); |
145 | showOne(showId); |
||
92 | jmachado | 146 | } |
147 | function show(id,hideId) |
||
148 | { |
||
223 | jmachado | 149 | hideOne(hideId); |
150 | showOne(id); |
||
92 | jmachado | 151 | } |
223 | jmachado | 152 | |
153 | function hideOne(id) |
||
159 | jmachado | 154 | { |
223 | jmachado | 155 | // getObjectById(id).style.visibility='hidden'; |
156 | // getObjectById(id).style.position='absolute'; |
||
157 | getObjectById(id).style.display='none'; |
||
159 | jmachado | 158 | } |
223 | jmachado | 159 | |
160 | function showOne(id) |
||
159 | jmachado | 161 | { |
223 | jmachado | 162 | // getObjectById(id).style.visibility='visible'; |
163 | // getObjectById(id).style.position='relative'; |
||
164 | getObjectById(id).style.display=''; |
||
165 | } |
||
166 | function showOrHideOne(id) |
||
167 | { |
||
168 | if(getObjectById(id).style.display == 'none') |
||
169 | showOne(id); |
||
159 | jmachado | 170 | else |
223 | jmachado | 171 | hideOne(id); |
159 | jmachado | 172 | } |
163 | jmachado | 173 | |
406 | jmachado | 174 | function showOrHideOneWithStartId(id) |
175 | { |
||
176 | for(var i = 1; getObjectById(id + i) != '' && getObjectById(id + i) != null && getObjectById(id + i) != 'undefined'; i++) |
||
177 | { |
||
178 | showOrHideOne(id + i); |
||
179 | } |
||
180 | } |
||
181 | |||
163 | jmachado | 182 | function showOrHide(id,hideValue,showValue) |
183 | { |
||
223 | jmachado | 184 | if(getObjectById(id).style.display == 'none') |
163 | jmachado | 185 | { |
223 | jmachado | 186 | showOne(id); |
163 | jmachado | 187 | return showValue; |
188 | } |
||
189 | else |
||
190 | { |
||
223 | jmachado | 191 | hideOne(id); |
163 | jmachado | 192 | return hideValue; |
193 | } |
||
194 | } |
||
92 | jmachado | 195 | |
1 | fvelez | 196 | /** |
53 | jmachado | 197 | * Creates a new XmlHttpObject |
198 | * @author Jorge Machado |
||
199 | * @date April 2008 |
||
1 | fvelez | 200 | * |
53 | jmachado | 201 | * params: |
202 | * @handler target xmlHttpObject function |
||
1 | fvelez | 203 | */ |
53 | jmachado | 204 | function GetXmlHttpObject(handler) |
1 | fvelez | 205 | { |
53 | jmachado | 206 | var objXmlHttp = null; |
207 | if (navigator.userAgent.indexOf("Opera")>=0) |
||
208 | { |
||
209 | alert("This example doesn't work in Opera") ; |
||
210 | return objXmlHttp; |
||
211 | } |
||
212 | if (navigator.userAgent.indexOf("MSIE")>=0) |
||
213 | { |
||
214 | var strName="Msxml2.XMLHTTP"; |
||
215 | if (navigator.appVersion.indexOf("MSIE 5.5")>=0) |
||
1 | fvelez | 216 | { |
53 | jmachado | 217 | strName="Microsoft.XMLHTTP"; |
1 | fvelez | 218 | } |
53 | jmachado | 219 | try |
220 | { |
||
221 | objXmlHttp=new ActiveXObject(strName); |
||
222 | objXmlHttp.onreadystatechange=handler ; |
||
223 | return objXmlHttp; |
||
224 | } |
||
225 | catch(e) |
||
226 | { |
||
227 | alert("Error. Scripting for ActiveX might be disabled") ; |
||
228 | return objXmlHttp; |
||
229 | } |
||
230 | } |
||
231 | if (navigator.userAgent.indexOf("Mozilla")>=0) |
||
232 | { |
||
233 | objXmlHttp=new XMLHttpRequest(); |
||
234 | objXmlHttp.onload=handler; |
||
235 | objXmlHttp.onerror=handler; |
||
236 | return objXmlHttp; |
||
237 | } |
||
1 | fvelez | 238 | } |
239 | |||
53 | jmachado | 240 | /*************************************************** |
241 | TopFlashNews |
||
163 | jmachado | 242 | ***************************************************/ |
53 | jmachado | 243 | var xmlHttpTopFlashNews; |
244 | var getFlashNewsTimeout; |
||
245 | var getFlashNewsJsp; |
||
381 | jmachado | 246 | var semaphoreFlashNews = 0; |
1 | fvelez | 247 | |
53 | jmachado | 248 | function getFlashNews(jsp,timeout) |
48 | fvelez | 249 | { |
53 | jmachado | 250 | getFlashNewsJsp = jsp; |
251 | getFlashNewsTimeout = timeout; |
||
381 | jmachado | 252 | semaphoreFlashNews = 1; |
53 | jmachado | 253 | getFlashNewsTimeoutCall(); |
48 | fvelez | 254 | } |
53 | jmachado | 255 | function getFlashNewsTimeoutCall() |
48 | fvelez | 256 | { |
53 | jmachado | 257 | xmlHttpTopFlashNews=GetXmlHttpObject(stateChangedGetFlashNews); |
381 | jmachado | 258 | semaphoreFlashNews = 1; |
53 | jmachado | 259 | startRequest(xmlHttpTopFlashNews,"","flashTopNews",stateChangedGetFlashNews,"",getFlashNewsJsp) |
48 | fvelez | 260 | } |
261 | function stateChangedGetFlashNews() |
||
262 | { |
||
381 | jmachado | 263 | if (semaphoreFlashNews == 1 && (xmlHttpTopFlashNews.readyState==4 || xmlHttpTopFlashNews.readyState=="complete")) |
53 | jmachado | 264 | { |
265 | getObjectById("flashTopNews").innerHTML=xmlHttpTopFlashNews.responseText; |
||
266 | setTimeout(getFlashNewsTimeoutCall,getFlashNewsTimeout); |
||
381 | jmachado | 267 | semaphoreFlashNews = 0; |
53 | jmachado | 268 | } |
48 | fvelez | 269 | } |
1 | fvelez | 270 | |
271 | |||
92 | jmachado | 272 | /*************************************************** |
273 | Search |
||
163 | jmachado | 274 | ***************************************************/ |
92 | jmachado | 275 | var xmlHttpSearch; |
276 | var searchResultsDiv; |
||
1 | fvelez | 277 | |
92 | jmachado | 278 | function searchCall(div,query,searchType,page,module,action) |
279 | { |
||
280 | searchResultsDiv = div; |
||
281 | xmlHttpSearch=GetXmlHttpObject(stateChangedSearchCall); |
||
282 | startRequest(xmlHttpSearch,"dispatch=searchModule&query=" + query + "&searchType=" + searchType + "&page=" + page + "&module=" + module,"",stateChangedSearchCall,"",action); |
||
283 | } |
||
284 | function stateChangedSearchCall() |
||
285 | { |
||
286 | if (xmlHttpSearch.readyState==4 || xmlHttpSearch.readyState=="complete") |
||
287 | { |
||
288 | getObjectById(searchResultsDiv).innerHTML=xmlHttpSearch.responseText; |
||
289 | } |
||
290 | } |
||
1 | fvelez | 291 | |
292 | |||
159 | jmachado | 293 | /*************************************************** |
294 | Pop |
||
163 | jmachado | 295 | ***************************************************/ |
159 | jmachado | 296 | var xmlHttpPop; |
297 | var popDiv; |
||
1 | fvelez | 298 | |
159 | jmachado | 299 | function loadPop(div,action) |
300 | { |
||
301 | popDiv = div; |
||
302 | xmlHttpPop=GetXmlHttpObject(stateChangedPopCall); |
||
303 | startRequest(xmlHttpPop,"","",stateChangedPopCall,"",action); |
||
304 | } |
||
305 | function stateChangedPopCall() |
||
306 | { |
||
307 | if (xmlHttpPop.readyState==4 || xmlHttpPop.readyState=="complete") |
||
308 | { |
||
309 | getObjectById(popDiv).innerHTML=xmlHttpPop.responseText; |
||
310 | } |
||
311 | } |
||
1 | fvelez | 312 | |
163 | jmachado | 313 | /*************************************************** |
314 | Reminders |
||
315 | ***************************************************/ |
||
198 | jmachado | 316 | |
317 | var activeRemindersCounter = 0; |
||
318 | var expiredRemindersCounter = 0; |
||
381 | jmachado | 319 | var semaphoreReminder = 0; |
198 | jmachado | 320 | |
321 | function setActiveReminders(active) |
||
322 | { |
||
323 | activeRemindersCounter = active; |
||
324 | } |
||
325 | function setExpiredReminders(expired) |
||
326 | { |
||
327 | expiredRemindersCounter = expired; |
||
328 | } |
||
329 | |||
163 | jmachado | 330 | var xmlHttpReminder; |
331 | var newReminderId; |
||
332 | var reminderFormId; |
||
333 | var putMsgId; |
||
334 | var putOkMsg; |
||
335 | var putFailMsg; |
||
1 | fvelez | 336 | |
163 | jmachado | 337 | function putReminder(startDate,expireDate,text,newReminderDiv,msgDiv,reminderFormDiv,action,waitMsg,okMsg,failMsg) |
338 | { |
||
381 | jmachado | 339 | if(semaphoreReminder == 1) |
340 | { |
||
341 | getObjectById(putMsgId).innerHTML = "<div class=\"messages\">busy...</div>"; |
||
342 | } |
||
343 | else |
||
344 | { |
||
345 | semaphoreReminder = 1; |
||
346 | newReminderId = newReminderDiv; |
||
347 | reminderFormId = reminderFormDiv; |
||
348 | putMsgId = msgDiv; |
||
349 | putOkMsg = okMsg; |
||
350 | putFailMsg = failMsg; |
||
351 | getObjectById(putMsgId).innerHTML = waitMsg; |
||
352 | xmlHttpReminder=GetXmlHttpObject(stateChangedPutReminderCall); |
||
353 | startRequest(xmlHttpReminder,"dispatch=save&startDate="+startDate+"&expireDate="+expireDate+"&reminderView.text="+ text,"",stateChangedPutReminderCall,"",action); |
||
223 | jmachado | 354 | // hideOne(reminderFormId); |
381 | jmachado | 355 | showOne(putMsgId); |
356 | } |
||
163 | jmachado | 357 | } |
358 | function stateChangedPutReminderCall() |
||
359 | { |
||
360 | if (xmlHttpReminder.readyState==4 || xmlHttpReminder.readyState=="complete") |
||
361 | { |
||
362 | if(xmlHttpReminder.responseText.indexOf("<div class=\"messages\">") >= 0) |
||
363 | { |
||
364 | getObjectById(putMsgId).innerHTML = xmlHttpReminder.responseText; |
||
365 | } |
||
381 | jmachado | 366 | else if(semaphoreReminder == 1) |
163 | jmachado | 367 | { |
381 | jmachado | 368 | semaphoreReminder = 0; |
163 | jmachado | 369 | getObjectById(putMsgId).innerHTML = '<div class="statusOK">' + putOkMsg + '</div>'; |
223 | jmachado | 370 | activeRemindersCounter = activeRemindersCounter + 1; |
371 | showOne('activeReminders'); |
||
163 | jmachado | 372 | getObjectById(newReminderId).innerHTML = xmlHttpReminder.responseText + getObjectById(newReminderId).innerHTML; |
373 | } |
||
374 | } |
||
165 | jmachado | 375 | setTimeout(cleanReminderStatus,3000); |
163 | jmachado | 376 | } |
377 | function cleanReminderStatus() |
||
378 | { |
||
379 | getObjectById(putMsgId).innerHTML = ''; |
||
380 | } |
||
1 | fvelez | 381 | |
198 | jmachado | 382 | function deleteExpiredReminder(id,deleteReminderDiv,msgDiv,reminderFormDiv,action,waitMsg,okMsg,failMsg) |
165 | jmachado | 383 | { |
198 | jmachado | 384 | deleteReminder(id,deleteReminderDiv,msgDiv,reminderFormDiv,action,waitMsg,okMsg,failMsg,stateChangedDeleteExpiredReminderCall); |
385 | } |
||
386 | function deleteActiveReminder(id,deleteReminderDiv,msgDiv,reminderFormDiv,action,waitMsg,okMsg,failMsg) |
||
387 | { |
||
388 | deleteReminder(id,deleteReminderDiv,msgDiv,reminderFormDiv,action,waitMsg,okMsg,failMsg,stateChangedDeleteActiveReminderCall); |
||
389 | } |
||
390 | function deleteReminder(id,deleteReminderDiv,msgDiv,reminderFormDiv,action,waitMsg,okMsg,failMsg,callBack) |
||
391 | { |
||
165 | jmachado | 392 | newReminderId = deleteReminderDiv; |
393 | reminderFormId = reminderFormDiv; |
||
394 | putMsgId = msgDiv; |
||
395 | putOkMsg = okMsg; |
||
396 | putFailMsg = failMsg; |
||
397 | getObjectById(putMsgId).innerHTML = waitMsg; |
||
198 | jmachado | 398 | xmlHttpReminder=GetXmlHttpObject(callBack); |
399 | startRequest(xmlHttpReminder,"dispatch=delete&id="+id,"",callBack,"",action); |
||
223 | jmachado | 400 | //hideOne(reminderFormId); |
401 | showOne(putMsgId); |
||
165 | jmachado | 402 | } |
1 | fvelez | 403 | |
198 | jmachado | 404 | function stateChangedDeleteExpiredReminderCall() |
405 | { |
||
223 | jmachado | 406 | |
407 | stateChangedDeleteReminderCall("expired"); |
||
198 | jmachado | 408 | if(expiredRemindersCounter <= 0) |
409 | { |
||
223 | jmachado | 410 | hideOne('expiredReminders'); |
198 | jmachado | 411 | } |
412 | if(expiredRemindersCounter < 0) |
||
413 | expiredRemindersCounter = 0; |
||
414 | } |
||
415 | function stateChangedDeleteActiveReminderCall() |
||
416 | { |
||
223 | jmachado | 417 | stateChangedDeleteReminderCall("active"); |
198 | jmachado | 418 | |
419 | if(activeRemindersCounter <= 0) |
||
420 | { |
||
223 | jmachado | 421 | hideOne('activeReminders'); |
198 | jmachado | 422 | } |
423 | if(activeRemindersCounter < 0) |
||
424 | activeRemindersCounter = 0; |
||
425 | } |
||
223 | jmachado | 426 | function stateChangedDeleteReminderCall(type) |
165 | jmachado | 427 | { |
428 | if (xmlHttpReminder.readyState==4 || xmlHttpReminder.readyState=="complete") |
||
429 | { |
||
223 | jmachado | 430 | if(type == "active") |
431 | activeRemindersCounter--; |
||
432 | else |
||
433 | expiredRemindersCounter--; |
||
434 | |||
165 | jmachado | 435 | if(xmlHttpReminder.responseText.indexOf("<div class=\"messages\">") >= 0) |
436 | { |
||
437 | getObjectById(putMsgId).innerHTML = xmlHttpReminder.responseText; |
||
438 | } |
||
439 | else |
||
440 | { |
||
441 | getObjectById(putMsgId).innerHTML = '<div class="statusOK">' + putOkMsg + '</div>'; |
||
442 | getObjectById(newReminderId).innerHTML = ''; |
||
443 | } |
||
444 | } |
||
445 | setTimeout(cleanReminderStatus,3000); |
||
446 | } |
||
1 | fvelez | 447 | |
48 | fvelez | 448 | |
430 | jmachado | 449 | /****************************** |
450 | * Cotas de Impressao |
||
451 | ******************************/ |
||
452 | var quotasDiv; |
||
453 | var xmlHttpQuotas; |
||
454 | var quotasErrorMsg; |
||
455 | var impressorasMsg; |
||
456 | var quotasDisponiveisMsg; |
||
457 | var donaldPretoMsg; |
||
458 | var billCorMsg; |
||
48 | fvelez | 459 | |
430 | jmachado | 460 | function loadQuotas(div,action,_quotasErrorMsg, _impressorasMsg, _quotasDisponiveisMsg, _donaldPretoMsg, _billCorMsg) |
461 | { |
||
48 | fvelez | 462 | |
430 | jmachado | 463 | quotasDiv = div; |
464 | quotasErrorMsg = _quotasErrorMsg; |
||
465 | impressorasMsg = _impressorasMsg; |
||
466 | quotasDisponiveisMsg = _quotasDisponiveisMsg; |
||
467 | donaldPretoMsg = _donaldPretoMsg; |
||
468 | billCorMsg = _billCorMsg; |
||
469 | if(!xmlHttpQuotas) |
||
470 | xmlHttpQuotas = GetXmlHttpObject(stateChangedLoadQuotasCall); |
||
471 | startRequest(xmlHttpQuotas,"","",stateChangedLoadQuotasCall,"",action); |
||
472 | } |
||
473 | function stateChangedLoadQuotasCall() |
||
474 | { |
||
475 | if (xmlHttpQuotas.readyState==4 || xmlHttpQuotas.readyState=="complete") |
||
476 | { |
||
477 | putQuotasImpressao(xmlHttpQuotas.responseXML); |
||
478 | } |
||
479 | } |
||
48 | fvelez | 480 | |
430 | jmachado | 481 | function putQuotasImpressao(xmlData) |
482 | { |
||
483 | if(xmlData == null) |
||
484 | { |
||
485 | getObjectById(quotasDiv).innerHTML=quotasErrorMsg; |
||
486 | } |
||
487 | else |
||
488 | { |
||
489 | var pretoTr = xmlData.getElementsByTagName('preto')[0].getElementsByTagName("tr")[0]; |
||
490 | var corTr = xmlData.getElementsByTagName('cor')[0].getElementsByTagName("tr")[0]; |
||
491 | if(pretoTr == null || corTr == null) |
||
492 | { |
||
493 | getObjectById(quotasDiv).innerHTML=quotasErrorMsg; |
||
494 | } |
||
495 | else |
||
496 | { |
||
497 | var copiasImpressasPreto = pretoTr.getElementsByTagName('td')[1].textContent; |
||
498 | var copiasDisponiveisPreto = pretoTr.getElementsByTagName('td')[2].textContent; |
||
499 | var copiasImpressasCor = corTr.getElementsByTagName('td')[1].textContent; |
||
500 | var copiasDisponiveisCor = corTr.getElementsByTagName('td')[2].textContent; |
||
501 | var response = ""; |
||
502 | response += "<table class=\"dataTable\">\n"; |
||
503 | response += " <tr>\n"; |
||
504 | response += " <th>" + impressorasMsg + "</th>\n"; |
||
505 | response += " <th>" + quotasDisponiveisMsg + "</th>\n"; |
||
506 | response += " </tr>\n"; |
||
507 | response += " <tr>\n"; |
||
508 | response += " <th>" + donaldPretoMsg + "</th>\n"; |
||
509 | if(copiasDisponiveisPreto == '0') |
||
510 | response += "<td align=\"right\" style=\"color:red\">"+ copiasDisponiveisPreto +"</td>\n" |
||
511 | else |
||
512 | response += "<td align=\"right\" style=\"color:green\">"+ copiasDisponiveisPreto +"</td>\n" |
||
513 | response += " </tr>\n"; |
||
514 | response += " <tr>\n"; |
||
515 | response += " <th>" + billCorMsg + "</th>\n"; |
||
516 | if(copiasDisponiveisCor == '0') |
||
517 | response += "<td align=\"right\" style=\"color:red\">"+ copiasDisponiveisCor +"</td>\n" |
||
518 | else |
||
519 | response += "<td align=\"right\" style=\"color:green\">"+ copiasDisponiveisCor +"</td>\n" |
||
520 | response += " </tr>\n"; |
||
92 | jmachado | 521 | |
430 | jmachado | 522 | response += "</table>\n"; |
523 | getObjectById(quotasDiv).innerHTML=response; |
||
524 | } |
||
525 | } |
||
526 | } |
||
92 | jmachado | 527 | |
528 | |||
159 | jmachado | 529 | |
530 | |||
531 | |||
163 | jmachado | 532 | |
533 | |||
534 | |||
165 | jmachado | 535 | |
536 | |||
537 | |||
430 | jmachado | 538 | |
539 | |||
540 | |||
541 |