[eluser]nuttynibbles[/eluser]
hi, i need to use ajax with CI. i need to pass in character like ??,& @ : = etc..
but i received an error saying "The URI you submitted has disallowed characters."
I understand this has to do with the config. but my question is, is there another around it? will it be safe to include these characters in my config file. would this lead to security breach?? tks
here is my ajax engine code:
Code:
var xmlHttp
function ajaxpost(siteurl,param,tag)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){
alert ("Browser does not support HTTP Request");
return;
}
var strurl=siteurl;
strurl=strurl+"/"+param;
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById(tag)[removed]=xmlHttp.responseText;
}
}
xmlHttp.open("GET",strurl,true);
xmlHttp.send(null);
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e){
// Internet Explorer
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
html code:
Code:
<div><input type="submit" value="submit"><div>
<div id="display"></div>
okay there's suppose to be onclick=ajaxpost('controller/function','hello world???://','display') in the submit button but i cant seems to add over there.. strange