Thanks again for the response,
I already tried the debugging using the alert messages and I didn't get any one of them, and I am calling one right after the start of the function
i.e. : I think that the IE never gets to run this javascript functions because I didn't get any feedback from the javascript.
Remember that this just happens at the QuickCreate of the module Notes and doesn't happen at the EditView, when the same exact functions are called.
The functions there are calling some PHP file via AJAX, and I am starting to think that I am getting this problem because the use of AJAX on this kind of "view".
Example of the function testaCond in JS:
PHP Code:
function testaCond(id, flag)
{
alert('zios');
var urlC;
xmlHttpCon=GetXmlHttpObjectCon();
if(xmlHttpCon==null)
{
alert ("Your browser does not support AJAX!");
return;
}
if(flag==0)
{
urlC = "include/javascript/testaAtribuirCond.php"+"?q="+id;
}
else
{
urlC = "include/javascript/testaRemoverCond.php"+"?q="+id;
}
xmlHttpCon.onreadystatechange=stateCon;
xmlHttpCon.open("GET",urlC,true);
xmlHttpCon.send(null);
}
function stateCon()
{
var responseArrayCon = new Array();
if (xmlHttpCon.readyState==4)
{
//retorno do php, numero de tickets por queue
responseArrayCon[0] = xmlHttpCon.responseText;
//alert(responseArrayCon[0]);
if(responseArrayCon[0]==-2)
{
alert('Cliente ja se encontra condicionado!');
}
else
{
if(responseArrayCon[0]==-1)
{
alert('Cliente ja se encontra nao condicionado!');
}
else
{
if(responseArrayCon[0]==1)
{
document.getElementById('assunto').value = 'Cliente passou a Nao Condicionado';
}
else
{
if(responseArrayCon[0]==2)
{
document.getElementById('assunto').value = 'Cliente retirado de Nao Condicionado';
}
else
{
alert('Ocorreu um erro desconhecido!');
}
}
}
}
}
}
function GetXmlHttpObjectCon()
{
var xmlHttpCon=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttpCon=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttpCon=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttpCon=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttpCon;
}
And this is the final HTML code (I get it by using Firebug on IE, I think that was what I was supposed to do, right?) :
HTML Code:
<input type="button" onclick="testaCond("4e1c44a6-14fd-f647-eb1a-4761f34c7c66","0");" value="Atribuir Não Condicionado" class="button" id="AtrCondicionado"/> If you need all the files I can send it to you too, but this would be in a PM. Note that the thing that's missing here is only the PHP file ... and unfortenally I don't think it has anything to do with this.
Once again, I hope somebody can help me ... because I am going crazy with this thing because one of my bosses uses only IE
Thank you,
Joel Oliveira
Bookmarks