Enjoy an ad free experience by logging in. Not a member yet?
Register .
02-28-2008, 10:00 AM
PM User |
#1
Regular Coder
Join Date: Jul 2006
Posts: 117
Thanks: 1
Thanked 0 Times in 0 Posts
problem with ajax site in ie6
Hello
I designed a site for a friend, the site is working perfectly on ie7, but on ie6 it's not working as it should. the site basicly is an acordeon with areas loaded using ajax.
Anyone can help me finding whats wrong here?
the site is
www.nunonunes-ferreira.com
Thanks
02-28-2008, 02:31 PM
PM User |
#2
Senior Coder
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
Since you are using Prototype, why are you not using it to make your Ajax calls. The library handles all of the quirks between browsers better than your code does.
Eric
__________________
Tech Author [Ajax In Action, JavaScript : Visual Blueprint]
02-28-2008, 02:33 PM
PM User |
#3
Regular Coder
Join Date: Jul 2006
Posts: 117
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
A1ien51
Since you are using Prototype, why are you not using it to make your Ajax calls. The library handles all of the quirks between browsers better than your code does.
Eric
well this was the way that i found to make this works. getting bits of code here and there
Can you help me to fix it?
THanks
03-04-2008, 04:18 AM
PM User |
#4
New Coder
Join Date: Feb 2008
Posts: 19
Thanks: 4
Thanked 0 Times in 0 Posts
hello,
I went to the link you had provided.
If you cant put the code which you are using it will be useful .
Cheers!!!
03-04-2008, 09:37 AM
PM User |
#5
Regular Coder
Join Date: Jul 2006
Posts: 117
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
nikku
hello,
I went to the link you had provided.
If you cant put the code which you are using it will be useful .
Cheers!!!
hi
here is the code (a bit long...)
Code:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Nuno Nunes-Ferreira</title>
<!-- Meta Tags -->
<meta name="robots" content="index, follow" />
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="javascript/pngfix.js"></script>
<![endif]-->
<!-- JavaScript -->
<!-- <script type="text/javascript" src="combine.php?type=javascript&files=prototype.js,effects.js,accordion.js,code_highlighter.js,javascript.js,html.js"></script> -->
<script type="text/javascript" src="javascript/prototype.js"></script>
<script type="text/javascript" src="javascript/effects.js"></script>
<script type="text/javascript" src="javascript/accordion.js"></script>
<script type="text/javascript" src="javascript/lightbox.js"></script>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="css/default.css" />
<script type="text/javascript">
//
// In my case I want to load them onload, this is how you do it!
//
Event.observe(window, 'load', loadAccordions, false);
//
// Set up all accordions
//
function loadAccordions() {
var bottomAccordion = new accordion('vertical_container');
var nestedVerticalAccordion = new accordion('vertical_nested_container', {
classNames : {
toggle : 'vertical_accordion_toggle',
toggleActive : 'vertical_accordion_toggle_active',
content : 'vertical_accordion_content'
}
});
// Open first one
//bottomAccordion.activate($$('#vertical_container .accordion_toggle')[0]);
// Open second one
//topAccordion.activate($$('#horizontal_container .horizontal_accordion_toggle')[2]);
}
</script>
<script type="text/javascript">
<!--
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
function solo(numero3) {
http.open("GET", "solo.php?ano=" + numero3, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('solo').innerHTML = http.responseText;
group(numero3);
}
}
http.send(null);
}
function group(numero4) {
http.open("GET", "group.php?ano=" + numero4, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('group').innerHTML = http.responseText;
other(numero4);
}
}
http.send(null);
}
function other(numero5) {
http.open("GET", "other.php?ano=" + numero5, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('other').innerHTML = http.responseText;
titulo(numero5);
}
}
http.send(null);
}
function titulo(numero) {
http.open("GET", "titulo1.php?id_ano=" + numero , true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('titulo').innerHTML = http.responseText;
replace(numero);
}
}
http.send(null);
}
function replace(numero2) {
http.open("GET", "imgs.php?id_ano=" + numero2 , true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('imgs').innerHTML = http.responseText;
initLightbox();
}
}
http.send(null);
}
function titulo2(numero) {
http.open("GET", "titulo3.php?id=" + numero , true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('titulo').innerHTML = http.responseText;
replace2(numero);
}
}
http.send(null);
}
function replace2(numero2) {
http.open("GET", "imgs3.php?id=" + numero2, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('imgs').innerHTML = http.responseText;
initLightbox();
}
}
http.send(null);
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<!-- CSS -->
<style type="text/css" >
/*
Vertical Accordions
*/
.accordion_toggle {
display: block;
height: 30px;
width: 100%;
background: #ffffff;
padding: 0 10px 0 40px;
line-height: 30px;
color: #000000;
font-weight: normal;
text-decoration: none;
outline: none;
font-size: 12px;
color: #000000;
border-bottom: 1px solid #F0EBE9;
cursor: pointer;
margin: 0 0 0 0;
}
.accordion_toggle_active {
/*cor do topo do menu*/
background: url(images/accordion_toggle_active.jpg) no-repeat top right #DFDFDF;
/*cor da letra*/
color: #ffffff;
/*cor da linha por baixo*/
border-bottom: 1px solid #F0EBE9;
}
.accordion_content {
background-color: #E9E9E9;
color: #A6A6A6;
overflow: hidden;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
padding-left: 40px;
}
.accordion_content h2 {
margin: 15px 0 5px 10px;
color: #0099FF;
}
.accordion_content a {
color: #666666;
}
.accordion_content p {
line-height: 150%;
}
.vertical_accordion_toggle {
display: block;
height: 30px;
width: 300px;
background: url(images/accordion_toggle.jpg) no-repeat top right #FFFFFF;
padding: 0 10px 0 10px;
line-height: 30px;
color: #A6A6A6;
font-weight: normal;
text-decoration: none;
outline: none;
font-size: 12px;
color: #000000;
border-bottom: 1px solid #f0ebe9;
cursor: pointer;
margin: 0 0 0 0;
}
.vertical_accordion_toggle_active {
background: url(images/accordion_toggle_active.jpg) no-repeat top right #DFDFDF;
color: #000000;
border-bottom: 1px solid #f0ebe9;
}
.vertical_accordion_content {
color: #A6A6A6;
overflow: hidden;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
}
.vertical_accordion_content h2 {
margin: 15px 0 5px 10px;
color: #0099FF;
}
.vertical_accordion_content p {
line-height: 150%;
padding: 5px 10px 15px 10px;
}
/*
/* Container styling*/
#vertical_nested_container {
margin: 20px 20px 20px 0px;
width: 100%;
}
.rights {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-style: normal;
margin-bottom: 0px;
vertical-align: bottom;
text-align: left;
padding-right: 20px;
padding-bottom: 20px;
padding-top: 10px;
color: #999999;
padding-left: 40px;
}
.foo2 {
line-height: 150%;
padding: 5px 10px 15px 10px;
}.titulo {
height: 30px;
}.imgs {
height: 30px;
}
body {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-color: #E9E9E9;
}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #999999;
}
</style>
<link href="javascript/lightbox.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style3 {
font-size: 10px;
color: #666666;
}
a:active.ano {
background-color: #ffffff;
}
a:link.ano {
}
a:hover.ano {
background-color: #ffffff;
}
a:visited.ano {
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
</head>
<body>
<div id="container"><br />
<div id="vertical_container" >
<h1 class="accordion_toggle"><img src="img/nunonunes.png" alt="" width="144" height="30" /></h1>
<div class="accordion_content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="style2"><br>
<?php echo $row_rs_topo['texto']; ?>
</span></td>
</tr>
</table>
</div><br />
<h1 class="accordion_toggle"><img src="img/past.png" alt="" width="41" height="30" /></h1>
<div class="accordion_content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"><?php do { ?>
<a href="#" class="ano" onclick="javascript :solo(<?php echo $row_rs_anos2['id']; ?>); return false"><?php echo $row_rs_anos2['ano']; ?></a> |
<?php } while ($row_rs_anos2 = mysql_fetch_assoc($rs_anos2)); ?></td>
</tr>
</table>
<div id="vertical_nested_container" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="498" valign="top"><div id="imgs"><table border="0" cellpadding="0" cellspacing="1">
<tr>
<?php
$rs_imagens_endRow = 0;
$rs_imagens_columns = 4; // number of columns
$rs_imagens_hloopRow1 = 0; // first row flag
do {
if($rs_imagens_endRow == 0 && $rs_imagens_hloopRow1++ != 0) echo "<tr>";
?>
<td><table width="130" height="130" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="130" height="130" align="center" valign="middle" bgcolor="#FFFFFF">
<a href="<?php echo $row_rs_imagens['big']; ?>" rel="lightbox" title="<?php echo $row_rs_imagens['descriccao']; ?>"><img src="<?php echo $row_rs_imagens['thumb']; ?>" alt="" border="0" /></a></td>
</tr>
</table></td>
<?php $rs_imagens_endRow++;
if($rs_imagens_endRow >= $rs_imagens_columns) {
?>
</tr>
<?php
$rs_imagens_endRow = 0;
}
} while ($row_rs_imagens = mysql_fetch_assoc($rs_imagens));
if($rs_imagens_endRow != 0) {
while ($rs_imagens_endRow < $rs_imagens_columns) {
echo("<td> </td>");
$rs_imagens_endRow++;
}
echo("</tr>");
}?>
</table></div>
<br /><br />
<div id="titulo"><span class="style3"><?php echo $row_rs_titulo['titulo']; ?></span></div></td>
<td width="20" valign="top"> </td>
<td align="left" valign="top">
<h3 class="vertical_accordion_toggle"><img src="img/solo.png" alt="" width="102" height="30" /></h3>
<div class="vertical_accordion_content">
<div id="solo">
<div class="foo2">
<?php do { ?>
/ <a href="#" onclick="titulo2(<?php echo $row_rs_solo['id']; ?>)"><?php echo $row_rs_solo['titulo']; ?></a><br />
<?php } while ($row_rs_solo = mysql_fetch_assoc($rs_solo)); ?></div>
</div>
</div>
<h3 class="vertical_accordion_toggle"><img src="img/group.png" alt="" width="111" height="30" /></h3>
<div class="vertical_accordion_content">
<div id="group">
<div class="foo2">
<?php do { ?>
/ <a href="#" onclick="titulo2(<?php echo $row_rs_group['id']; ?>)"><?php echo $row_rs_group['titulo']; ?></a><br />
<?php } while ($row_rs_group = mysql_fetch_assoc($rs_group)); ?><br />
</div>
</div>
</div>
<h3 class="vertical_accordion_toggle"><img src="img/other.png" alt="" width="81" height="30" /></h3>
<div class="vertical_accordion_content">
<div id="other"><div class="foo2">
<?php do { ?>
/ <a href="#" onclick="titulo2(<?php echo $row_rs_others['id']; ?>)"><?php echo $row_rs_others['titulo']; ?></a><br />
<?php } while ($row_rs_others = mysql_fetch_assoc($rs_others)); ?></div>
</div>
</div></td>
</tr>
</table>
</div>
</ul>
</p>
</div><h1 class="accordion_toggle"><img src="img/present.png" alt="" width="55" height="30" /></h1>
<div class="accordion_content">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><?php do { ?><br />
<?php echo $row_rs_present['descricao']; ?><br />
<?php } while ($row_rs_present = mysql_fetch_assoc($rs_present)); ?><br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<h1 class="accordion_toggle"><img src="img/future.png" alt="" width="47" height="30" /></h1>
<div class="accordion_content">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><?php do { ?>
<?php echo $row_rs_future['descricao']; ?><br />
<?php } while ($row_rs_future = mysql_fetch_assoc($rs_future)); ?></td>
</tr>
</table>
</div><br />
<h1 class="accordion_toggle"><img src="img/contact.png" alt="" width="55" height="30" /></h1>
<div class="accordion_content">
<form id="form1" method="post" action="email.php">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Phone: </td>
<td height="30">00 351 919 190 666 </td>
</tr>
<tr>
<td>E-mail:</td>
<td height="30"><a href="mailto:mail@nunonunes-ferreira.com">mail@nunonunes-ferreira.com</a></td>
</tr>
<tr>
<td>Name</td>
<td height="30"><label>
<input name="nome" type="text" id="nome" size="50" />
</label></td>
</tr>
<tr>
<td>E-mail</td>
<td height="30"><label>
<input name="mail" type="text" id="mail" size="50" />
</label></td>
</tr>
<tr>
<td>Text</td>
<td><label>
<textarea name="frase" cols="38" id="frase"></textarea>
</label></td>
</tr>
<tr>
<td> </td>
<td height="30"><label>
<input name="Submit" type="submit" class="style2" value="Submit" />
</label></td>
</tr>
</table>
</form>
<hr align="left" width="370" size="1" noshade="noshade" />
</div>
</div>
</div>
<div class="rights">
All rights reserved nunonunes-ferreira ©</div>
<script type="text/javascript" >
//
// You can hide the accordions on page load like this, it maintains accessibility
//
// Special thanks go out to Will Shaver @ http://primedigit.com/
//
var verticalAccordions = $$('.accordion_toggle');
verticalAccordions.each(function(accordion) {
$(accordion.next(0)).setStyle({
height: '0px'
});
});
</script>
</body>
</html>
03-07-2008, 05:43 PM
PM User |
#6
Regular Coder
Join Date: Jul 2006
Posts: 117
Thanks: 1
Thanked 0 Times in 0 Posts
no one can help me?
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 07:36 AM .
Advertisement
Log in to turn off these ads.