Thursday, January 19, 2012

Batery Kereta Kong

hehe.. happen to me.. sebulan xstart kete.. bile nk start kete langsung xboleh.. nk bukak kete pakai remote langsung xleh.. then after sebulan lepas tu baru nk g servis kete sbb dh terdesak nk pakai kete.. Suspect definately because of the car batery..

Cari online servis tukar bateri kereta. Xdak la plak.. Asking fren ada nombor orang yang buat servis supply car batery x.. Alhamdulillah ada.. hehe.. nmpak kat tepi2 jln ada banner tergantung.. mmg servis tiptop.. kol kul 8 mlm ckp, mlm tu kol 10mlm tu gak die sampai. cas dlm 80RM ke 75RM.. xingat dh.. mmg berbaloi.. tunggu ja umah pastu satg die sampai... number tu contact, tgk image dibawah.. hehe

Tukar Batery Kereta, Batery Kering, Mencari Bateri Kereta

Thursday, January 12, 2012

Ajax not working in Google Chrome, Firefox

The Idea
Here will be the ajax XMLHttpRequest function. And how i implement this in my page. Only 2 function involve and this can be share by other page. Just matter on how you code your coding.

<script language="javascript">
var xmlhttp=null;
function getXMLHTTP() { //fuction to return the xml http object
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
catch (e){
// Internet Explorer
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
catch (e){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
return xmlHttp;
function getAll(strURL,namaDiv) {
//alert (strURL);
var xmlhttp = getXMLHTTP();
if (xmlhttp) {

xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
// only if "OK"
if (xmlhttp.status == 200) {
//alert(namaDiv + '\n' +req.responseText);
} else {
//alert("There was a problem while using XMLHTTP:\n" + req.statusText);
}"GET", strURL, true);
<a href="javascript:void(0);" onClick="getAll('ajax.php?jenis=logout&nilai=','divLogin')">Keluar</a>

The problem
My ajax working fine on hyperlink.. But i had the problem with button or any other input. I have retry to edit the ajax function, but the end still failed to work on Crome. Keeping browsing on the net for the solution but still no solution. But luckily..

The Solution
I have found the solution or the reason why the ajax failed to work on Crome & Firefox for the input button. You much ADD the <form name="ajax" method="POST" action=""></form> where the button and other input locate is. Yes just simple as that. This work on me, hope will work on you guys too. Good Luck!

Problem with AJAX and Chrome
Ajax XMLHttpRequest Test with Chrome
simple ajax works in IE but not chrome and FF
Problem with ajax onsubmit only in google chrome