Welcome Guest, Not a member yet? Register   Sign In
[question] getXMLHTTP - CI
#1

[eluser]sloth[/eluser]
Salam,

I want to create another xmlhttp request combine with CI.
I controller to call page : 'visit/add/583'
here a javascriptfunction:

Code:
function getXMLHTTP() {  
......
......
......
}  

function getKecamatan(strURL) {  
    var req = getXMLHTTP();  
    if (req) {  
        req.onreadystatechange = function() {  
            if (req.readyState == 4) {  
                // only if “OK”  
                if (req.status == 200) {  
                    document.getElementById('id_kecamatan')[removed]=req.responseText;  
                } else {  
                    alert("There was a problem while using XMLHTTP:\n" + req.statusText);  
                }  
            }  
        }  
        req.open("GET", strURL, true);  
        req.send(null);  
    }  
}

i already have view to call that javascriptfunction.

Result from xmlhttp it call 'visit/add/getNakes/5'
I want it call 'visit/getNakes/5'

NB : i already have function getNakes on controller visit.




Theme © iAndrew 2016 - Forum software by © MyBB