S
SeanInSeattle
So, I'm getting an error on line 27, where I close the first catch
with a curly brace. Here's the code:
Can anyone tell me why it would be giving me the error msg there? I'm
not getting the same error in Mozilla, and I've searched around and
haven't been able to find any info on issues with cross browser
support for try & catch.
with a curly brace. Here's the code:
Code:
function ShowBlog(page){
document.getElementById('blog').innerHTML = "<p style=\"color:
orange; font-weight: bold;\"><i>Loading, I appreciate your
patience . . .</i></p>";
var xmlHttp;
// Creating the xmlHttp var depending on the browser
try{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
var url = "../php/blog-ReturnStr.php";
var params = "page=" + page + "accesslvl=" + <?php if
(isset($_SESSION['_ACCESSLVL'])){ echo $_SESSION['_ACCESSLVL']; } else
echo "1"; ?>;
xmlHttp.open("GET", url+"?"+params, true);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.getElementById('blog').innerHTML = xmlHttp.responseText;
}
else if (xmlHttp.readyState == 2 | 3){
document.getElementById('blog').innerHTML = "<p style=\"color:
orange; font-weight: bold;\"><i>Loading, I appreciate your
patience . . .</i></p>";
}
}
xmlHttp.send(null);
}
Can anyone tell me why it would be giving me the error msg there? I'm
not getting the same error in Mozilla, and I've searched around and
haven't been able to find any info on issues with cross browser
support for try & catch.