PDA

View Full Version : ie error is not an object or null for Accordion Content script



disdro1212
09-01-2010, 07:01 AM
1) Script Title: Accordion Content script (v1.9)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

3) Describe problem: ie 7 gives is not an object or null error. i want to use third one. And i weed out the other scripts. Everything seems okay, all functions worked fine but it gives an error ie7 only when i load page and refresh it or when i go to another page from ddaccordion content script page . I have read all the topic but i didn't get result

jscheuer1
09-01-2010, 07:39 AM
I get no such error from the demo page. It's likely something you put or left in, or took out that you shouldn't have. If persistence is a factor, you may be persisting two dissimilar accordions with the same cookie.

To know for sure we would need to see the page:

Please post a link to a page on your site that contains the problematic code so we can check it out.

BTW, it's probably an error in other browsers as well. It's just that other browsers' default error reporting is not as aggressive as is IE's.

disdro1212
09-01-2010, 08:47 AM
i am tying to make register form. And my php code is below. Everything in the place to be. jquery, images etc.


<?




include ("some db and function php")...........








?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>member</title>



<script type="text/javascript" src="jquery.js"></script>



<script type="text/javascript" src="js/ddaccordion.js"> </script>




<style type="text/css">



.mypets{ /*header of 1st demo*/

cursor: hand;

cursor: pointer;

padding: 2px 5px;

border: 1px solid gray;

background: #E1E1E1;

}



.openpet{ /*class added to contents of 1st demo when they are open*/

background: yellow;

}



.places{ /*header of 2nd demo*/

background: darkblue url(sexypanelright.gif) no-repeat right top; /*color of menu by default*/

width: 400px; /* width of header */

cursor: hand;

cursor: pointer;

font: bold 16px "Lucida Grande", "Trebuchet MS", Verdana;

display: block;

color: white;

padding: 5px 0;

margin-bottom:2px;

text-indent: 8px;

text-decoration: none;

border-bottom: 1px solid black;

}



.openplace{

background-color: black;

}



div.theplace{ /*content container of 2nd demo*/

width: 400px;

padding:10px;

}



.technology{ /*header of 3rd demo*/

cursor: hand;

cursor: pointer;

font: bold 14px Verdana;

margin: 10px 0;

}





.openlanguage{ /*class added to contents of 3rd demo when they are open*/

color: green;

}



.closedlanguage{ /*class added to contents of 3rd demo when they are closed*/

color: red;

}



.togglehtml li{

margin-bottom: 8px;

}



.myheader{

cursor: hand;

cursor: pointer;

}



.mycontent{

padding-top: 2px;

padding-bottom: 9px;

}



</style>



<script type="text/javascript">



ddaccordion.init({

headerclass: "technology",

contentclass: "thelanguage",

revealtype: "click",

mouseoverdelay: 200,

collapseprev: false,

defaultexpanded: [],

onemustopen: false,

animatedefault: false,

persiststate: false,

toggleclass: ["closedlanguage", "openlanguage"],

togglehtml: ["prefix", "<img src='images/80mxwlz.gif' style='width:13px; height:13px' /> ", "<img src='images/arrow2.gif' style='width:13px; height:13px' /> "],

animatespeed: "fast",

oninit:function(expandedindices){},

onopenclose:function(header, index, state, isuseractivated){}

})





</script>

<style type="text/css">

.thepet{display: none}

a.hiddenajaxlink{display: none}

</style><style type="text/css">

.theplace{display: none}

a.hiddenajaxlink{display: none}

</style><style type="text/css">

.thelanguage{display: none}

a.hiddenajaxlink{display: none}

</style><style type="text/css">

.mycontent{display: none}

a.hiddenajaxlink{display: none}

</style>

</head>



<body>









<?


function registerForm (){

?>

<p>

<a href="#" onclick="ddaccordion.collapseall('technology'); return false">Collapse all</a> |

<a href="#" onclick="ddaccordion.expandall('technology'); return false">Expand all</a> </p>



<div class="technology">

form1 :</div>



<div class="thelanguage"> <? /* getform1 ("new","addbut") ;*/ ?> </div>



<div class="technology">

form2: </div>

<div class="thelanguage"> <? /* getform2 ("new","addbut") ; */ ?></div>



<div class="technology">

form3 </div>

<div class="thelanguage"> <? /* getform3 ("new","addbut") ; */ ?></div>



<?php

} // end registerForm













if (empty($button)){

unset($_POST);

echo' <div id="zone">



</div>

<FORM name="ajax" method="POST" action="">';

registerForm () ;

echo '



<INPUT type="button" value="Submit" name="button" id="button" ONCLICK="submitForm()" />';

echo '</form>';





}











?>





</body></html>

disdro1212
09-01-2010, 12:01 PM
My php code is below.




<?





include(" some db and functions php");











?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>membership</title>



<script type="text/javascript" src="jquery.js"></script>



<script type="text/javascript" src="js/ddaccordion.js"> </script>

<script type="text/javascript" src="js/registerajax.js"></script>



<style type="text/css">



.mypets{ /*header of 1st demo*/

cursor: hand;

cursor: pointer;

padding: 2px 5px;

border: 1px solid gray;

background: #E1E1E1;

}



.openpet{ /*class added to contents of 1st demo when they are open*/

background: yellow;

}



.places{ /*header of 2nd demo*/

background: darkblue url(sexypanelright.gif) no-repeat right top; /*color of menu by default*/

width: 400px; /* width of header */

cursor: hand;

cursor: pointer;

font: bold 16px "Lucida Grande", "Trebuchet MS", Verdana;

display: block;

color: white;

padding: 5px 0;

margin-bottom:2px;

text-indent: 8px;

text-decoration: none;

border-bottom: 1px solid black;

}



.openplace{

background-color: black;

}



div.theplace{ /*content container of 2nd demo*/

width: 400px;

padding:10px;

}



.technology{ /*header of 3rd demo*/

cursor: hand;

cursor: pointer;

font: bold 14px Verdana;

margin: 10px 0;

}





.openlanguage{ /*class added to contents of 3rd demo when they are open*/

color: green;

}



.closedlanguage{ /*class added to contents of 3rd demo when they are closed*/

color: red;

}



.togglehtml li{

margin-bottom: 8px;

}



.myheader{

cursor: hand;

cursor: pointer;

}



.mycontent{

padding-top: 2px;

padding-bottom: 9px;

}



</style>



<script type="text/javascript">



ddaccordion.init({

headerclass: "technology",

contentclass: "thelanguage",

revealtype: "click",

mouseoverdelay: 200,

collapseprev: false,

defaultexpanded: [],

onemustopen: false,

animatedefault: false,

persiststate: false,

toggleclass: ["closedlanguage", "openlanguage"],

togglehtml: ["prefix", "<img src='images/80mxwlz.gif' style='width:13px; height:13px' /> ", "<img src='images/arrow2.gif' style='width:13px; height:13px' /> "],

animatespeed: "fast",

oninit:function(expandedindices){},

onopenclose:function(header, index, state, isuseractivated){}

})





</script>

<style type="text/css">

.thepet{display: none}

a.hiddenajaxlink{display: none}

</style><style type="text/css">

.theplace{display: none}

a.hiddenajaxlink{display: none}

</style><style type="text/css">

.thelanguage{display: none}

a.hiddenajaxlink{display: none}

</style><style type="text/css">

.mycontent{display: none}

a.hiddenajaxlink{display: none}

</style>

</head>



<body>









<?

include("menu.php");

function registerForm (){

?>

<p>

<a href="#" onclick="ddaccordion.collapseall('technology'); return false">Collapse all</a> |

<a href="#" onclick="ddaccordion.expandall('technology'); return false">Expand all</a> </p>



<div class="technology">

form1 header:</div>



<div class="thelanguage"> <? /* form1 ("new","addbut") ;*/ ?> </div>



<div class="technology">

form2 header: </div>

<div class="thelanguage"> <? /* form2 "new","addbut") ; */ ?></div>



<div class="technology">

form3 header </div>

<div class="thelanguage"> <? /* form3 ("new","addbut") ; */ ?></div>



<?php

} // end registerForm













if (empty($button)){

unset($_POST);

echo' <div id="zone">



</div>

<FORM name="ajax" method="POST" action="">';

registerForm () ;

echo '



<INPUT type="button" value="Submit" name="button" id="button" ONCLICK="submitForm()" />';

echo '</form>';





}











?>





</body></html>

disdro1212
09-01-2010, 12:35 PM
the other stuffs are at right place ... images, ddaccordion.js etc

jscheuer1
09-01-2010, 02:52 PM
That;s two different sets of PHP code. To really diagnose this I would prefer a link to the page. If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.