hey guys how are you all?
i am recieving the following error in all my pages except my homepage on internet explorer.

Line: 49
Char: 1
Error: 'null' is null or not an object
Code: 0
URL : http://www.worldofpakistan.net/register.phpLine: 49
Char: 1
Error: 'null' is null or not an object
Code: 0
URL : http://www.worldofpakistan.net/register.php

following is the page 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" xml:lang="en" lang="en">


<head><title>MN Tech Solutions Blog Software--Registeration Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keyword" content="" />
<meta name="description" content=" " />
<meta http-equiv="content-language" content="en" />


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



<!--Software House: MN Tech Solutions-->
<!--Designer/Programmer: Mustafa Neguib-->
<!--Date Project Started: 17th June 2008-->
<?php
include 'browsercheck.php';
?>

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



-->
</style>


</head>
<body>


<div id="div1">

 <script type="text/javascript">
window.onload=function(){
if(!NiftyCheck())
    return;
Rounded("div#first","#EFF6F9","#9BD1FA");
Rounded("div#second","#EFF6F9","#9BD1FA"); 
Rounded("div#third","#EFF6F9","#9BD1FA"); 
}
</script> 

<div id="div2">

<div id="div8">
<img src="logo.jpg" title="Banner" alt="Banner" />
</div>

</div>

<div id="div3">

<div id="main">
<ul>
<li><a href="index.php" title="Home Page">Home Page</a></li>
<li><a href="login.php?abcdghsjau=1" title="Login Page">Login</a></li>
<li><a href="show.php" title="Read an Article">Read an Article</a></li>

</ul>

</div>

</div>




<div id="div4">
<div id="first">
<h2>Registration Page</h2>
<p>
Please fill out the following form in order to register on this site.
Also provide a real email address as we will send updates to you at the email address provided.
</p>


<form method="post" action="insertuser.php">

<p>
First Name: <input type="text" name="fname" />
</p>
<p>
Last Name: <input type="text" name="lname" />
</p>
<p>
Username: <input type="text" name="username" />
</p>
<p>
Password: <input type="password" name="password" />
</p>
<p>
Email: <input type="text" name="email" />
</p>
<p>
Country: <input type="text" name="country" />
</p>
<p>
Age: <input type="text" name="age" />
</p>

<p>
<input type="submit" value="submit" name="Submit" />

<input type="reset" value="Clear All" name="reset" />
</p>

</form>


</div>
</div>

<div id="div7">
<?php include'copyright.html';?>
</div>




</div>
</body>
</html>

when i remove the following code from the page the error goes away, but when i put it back inside the error comes back.

<script type="text/javascript">window.onload=function(){if(!NiftyCheck())    return;Rounded("div#first","#EFF6F9","#9BD1FA");Rounded("div#second","#EFF6F9","#9BD1FA"); Rounded("div#third","#EFF6F9","#9BD1FA"); }</script> <script type="text/javascript">window.onload=function(){if(!NiftyCheck())    return;Rounded("div#first","#EFF6F9","#9BD1FA");Rounded("div#second","#EFF6F9","#9BD1FA"); Rounded("div#third","#EFF6F9","#9BD1FA"); }</script>

the following is the javascript file contain teh function.

function NiftyCheck(){
if(!document.getElementById || !document.createElement)
    return(false);
var b=navigator.userAgent.toLowerCase();
if(b.indexOf("msie 5")>0 && b.indexOf("opera")==-1)
    return(false);
return(true);
}

function Rounded(selector,bk,color,size){
var i;
var v=getElementsBySelector(selector);
var l=v.length;
for(i=0;i<l;i++){
    AddTop(v[i],bk,color,size);
    AddBottom(v[i],bk,color,size);
    }
}

function RoundedTop(selector,bk,color,size){
var i;
var v=getElementsBySelector(selector);
for(i=0;i<v.length;i++)
    AddTop(v[i],bk,color,size);
}

function RoundedBottom(selector,bk,color,size){
var i;
var v=getElementsBySelector(selector);
for(i=0;i<v.length;i++)
    AddBottom(v[i],bk,color,size);
}

function AddTop(el,bk,color,size){
var i;
var d=document.createElement("b");
var cn="r";
var lim=4;
if(size && size=="small"){ cn="rs"; lim=2}
d.className="rtop";
d.style.backgroundColor=bk;
for(i=1;i<=lim;i++){
    var x=document.createElement("b");
    x.className=cn + i;
    x.style.backgroundColor=color;
    d.appendChild(x);
    }
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,bk,color,size){
var i;
var d=document.createElement("b");
var cn="r";
var lim=4;
if(size && size=="small"){ cn="rs"; lim=2}
d.className="rbottom";
d.style.backgroundColor=bk;
for(i=lim;i>0;i--){
    var x=document.createElement("b");
    x.className=cn + i;
    x.style.backgroundColor=color;
    d.appendChild(x);
    }
el.appendChild(d,el.firstChild);
}

function getElementsBySelector(selector){
var i;
var s=[];
var selid="";
var selclass="";
var tag=selector;
var objlist=[];
if(selector.indexOf(" ")>0){  //descendant selector like "tag#id tag"
    s=selector.split(" ");
    var fs=s[0].split("#");
    if(fs.length==1) return(objlist);
    return(document.getElementById(fs[1]).getElementsByTagName(s[1]));
    }
if(selector.indexOf("#")>0){ //id selector like "tag#id"
    s=selector.split("#");
    tag=s[0];
    selid=s[1];
    }
if(selid!=""){
    objlist.push(document.getElementById(selid));
    return(objlist);
    }
if(selector.indexOf(".")>0){  //class selector like "tag.class"
    s=selector.split(".");
    tag=s[0];
    selclass=s[1];
    }
var v=document.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass=="")
    return(v);
for(i=0;i<v.length;i++){
    if(v[i].className==selclass){
        objlist.push(v[i]);
        }
    }
return(objlist);
}

please help
thanx in advance

I've never used that script but it sounds like this type of error:
I don't see <div>s that match up to these two lines:

Rounded("div#second","#EFF6F9","#9BD1FA"); 
Rounded("div#third","#EFF6F9","#9BD1FA");

:-/

the missing divs was the problem. the problem has been solved. thanx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.