Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Ajax not working in firefox when DOCTYPE is added


mini - 11:36 am on Dec 20, 2008 (gmt 0)


Hi,

When I add the DOCTYPE, ajax is not working in Mozilla firefox though it works in Internet Explorer. What can be done in this case? I just want to make my code w3c compliant.

This code works fine (in both IE and firefox):

<html>
<head>
<title><?php echo $title;?></title>
<meta name="robots" content="all,index,follow"/>
<meta name="description" content="<?php echo $description;?>"/>
<meta name="keywords" content="<?php echo $keywords;?>"/>
<meta name="classification" content="hotels,resorts"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style type="text/css">
<!--
body {
background-color: #666666;
margin:0;
padding:0;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
..........

But this code does not work in firefox but works in IE:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title;?></title>
<meta name="robots" content="all,index,follow"/>
<meta name="description" content="<?php echo $description;?>"/>
<meta name="keywords" content="<?php echo $keywords;?>"/>
<meta name="classification" content="hotels,resorts"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style type="text/css">
<!--
body {
background-color: #666666;
margin:0;
padding:0;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
..........


Thread source:: http://www.webmasterworld.com/javascript/3811826.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com