473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Errors Code 0 with IE

Hi,
I wrote some functionality for a Web Page with Javascript. My code works
perfectly for Firefox but not for IE.
I become some errors apparently all based in the same problem wich
scapes to my knowledge. If anyone can help me, i would be really grateful.

These are the errors i was speaking about:

--------------------------------------------
Line: 58
Char 10
Error: 'parent.frames.blog.document.getElementById(...)' is null or not
an object
Code 0
URL: http://localhost/example_0230366/frame_control.htm
Line 58 is:
parent.frames["blog"].document.getElementById("EntryNumber").value = ax[0];
where ax is an array.
---------------------------------------------------------------------------------------------------
Line: 67
Char 2
Error: Invalid argument.
Code 0
URL: http://localhost/example_0230366/frame_control.htm
Line 67 is:
parent.frames["blog"].document.getElementById("secondarynav").appendChi ld(myul);
where myul is an "ul" element.
--------------------------------------------
In line 88 two errors:
Line: 88
Char 2
Error: 'parent.frames.blog.document.getElementById(...)' is null or not
an object
Code 0
URL: http://localhost/example_0230366/frame_control.htm

Line: 88
Char 2
Error: Invalid argument
Code 0
URL: http://localhost/example_0230366/frame_control.htm
Line 88 is:
parent.frames["blog"].document.getElementById("content").appendChild(my h2)
where myh2 is an "h2l" element.
---------------------------------------------------------------------------------------
Jul 23 '05 #1
2 2472
Sergio del Amo wrote:
Hi,
I wrote some functionality for a Web Page with Javascript. My code works
perfectly for Firefox but not for IE.
I become some errors apparently all based in the same problem wich
scapes to my knowledge. If anyone can help me, i would be really grateful.

These are the errors i was speaking about:

....

Can you post your frameset + frames to a website where we may view the
code in its entirety?

Jul 23 '05 #2
Random wrote:
Sergio del Amo wrote:
Hi,
I wrote some functionality for a Web Page with Javascript. My code works
perfectly for Firefox but not for IE.
I become some errors apparently all based in the same problem wich
scapes to my knowledge. If anyone can help me, i would be really grateful.

These are the errors i was speaking about:


...

Can you post your frameset + frames to a website where we may view the
code in its entirety?


My site it is still not online but i post here the code. It is a remote
scripting with hidden frame project. All the javascript is in the
frames_control.htm frame:
frameset:
---------------------------------------------------------
<base target="_top">
<frameset rows="100%,0%,0%" border="0">
<frame src="blog.html" name="blog" scrolling="yes"/>
<frame src="frame_control.htm" name="control" scrolling="no"/>
<frame src="empty.htm" name="Buffer" scrolling="no"/>
</frameset>
-----------------------------------------------------------
blog.html:
-----------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
<script src="scripts/functions.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<img id="clip" src="./images/letter_top.gif" />
<div id="primarynav">
<ul>
<li><a href="index.html">Home</a></li>
<li><a
href='javascript:parent.frames["control"].show_archives()'>Archives</a></li>
<li><a
href='javascript:parent.frames["control"].show_links()'>Links</a></li>
</ul>
</div>
<div id="decoration">
<img src="images/home_blog.jpg" width="250" height="310px"
alt="AMO BLOG"/>
</div>
<div id="secondarynav">
<h3>Past entries</h3>
</div>
<div id="content">
</div>
<div id="feedback">
<h3>Post a Comment:</h3>
<p>Pleas start your URL's with 'http://'. Your email
address will not be shown.</p>
<div id="form">
<form method="get" action="">
<input type="hidden" name="ENr" id="EntryNumber">
<div><label for="text">Message:</label><textarea
name="CContent" id="CContent" cols="20" rows="8"></textarea></div>
<div><label for="author">Name:</label><input
type="text" name="CAuthor" id="CAuthor" /></div>
<div><label for="email">E-mail:</label><input
type="text" name="CAuthorEMail" id="CAuthorEmail" /></div>
<div><label for="url">URL:</label><input
type="text" name="CAuthorURL" id="CAuthorURL" /><input type="submit"
name="button" value="Send" class="button"
onClick='javascript:parent.frames["control"].addNewComment()'/></div>
</form>
</div>
</div>
<div id="footer">
<p> <a href="http://www.moonsunweb.com">MoonSun Web
Design</a> - Amo's Blog - 2005</p>
<div id="validator">
<a class="valid"
href="http://validator.w3.org/check/referer" title="Check the validity
of this site’s XHTML">xhtml</a>
<a
href="http://jigsaw.w3.org/css-validator/check/referer" title="Check the
validity of this site’s CSS">css</a>
</div>
</div>
</div>
</body>
</html>
------------------------------------------------------------------------
Empty.html:
------------------------------------------------------------------------
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
------------------------------------------------------------------------
frames.html:

<html>
<head>
<script>
<!--
var last_entries ='';
var entry = '';
function initIt()
{
setTimeout("Fbegin1()",300);
}
function Fbegin1()
{
serverLoad("example_0230366/scripts/list_last_entries.php?",
"afterList_last_entriesLoaded");
}
function afterList_last_entriesLoaded()
{
last_entries = parent.frames["Buffer"].document.buffer.line.value;
show_last_entries_menu();
}
function afterShow_last_entryLoaded()
{
entry = parent.frames["Buffer"].document.buffer.line.value;
show_last_entryLoaded();
}
function serverLoad(pX,rX)
{
var server="http://localhost/";
var url = server + pX + '&return=' + rX;
parent.frames["Buffer"].document.location.href=url;
}
function showEntry(ENr)
{
deleteNodeChilds("content");
parent.frames["blog"].document.getElementById("feedback").style.display
= "block";
parent.frames["blog"].document.getElementById("EntryNumber").value = ENr;
serverLoad("example_0230366/scripts/show_entry.php?ENr="+ENr,"afterShow_last_entryLoad ed");
}
function deleteNodeChilds(id)
{
var number =
parent.frames["blog"].document.getElementById(id).childNodes.length;
for(var i=0;i<number;i++)
{
var node =
parent.frames["blog"].document.getElementById(id).firstChild;
parent.frames["blog"].document.getElementById(id).removeChild(node);
}
}
function show_last_entries_menu()
{
var A = new Array();
var ax = new Array();
var myli,mya,myText;
var myul = document.createElement("ul");
A = last_entries.split('\n');
for(var i=0;i<A.length;i++)
{
ax = A[i].split('|');
if(i==0)

//parent.frames["blog"].document.getElementById("EntryNumber").value =
ax[0];
myli = document.createElement("li");
mya = document.createElement("a");
mya.href =
'javascript:parent.frames["control"].showEntry("'+ax[0]+'")';
myText = document.createTextNode(ax[1]);
mya.appendChild(myText);
myli.appendChild(mya);
myul.appendChild(myli);
}
//parent.frames["blog"].document.getElementById("secondarynav").appendChi ld(myul);
serverLoad("example_0230366/scripts/show_last_entry.php?",
"afterShow_last_entryLoaded");
}
function show_last_entryLoaded()
{
var A = new Array();
var ax = new Array();
var i = 0;
var myh2,myh1,myp,MyText;
var mydiv,myh3,mydiv2,mya;
A = entry.split('\n');
ax= A[i].split('|');
myh2 = document.createElement("h2");
myText = document.createTextNode(ax[2]);
myh2.appendChild(myText);
myh1 = document.createElement("h1");
myText = document.createTextNode(ax[0]);
myh1.appendChild(myText);
myp = document.createElement("p");
myText = document.createTextNode(ax[1]);
myp.appendChild(myText);
parent.frames["blog"].document.getElementById("content").appendChild(my h2);
parent.frames["blog"].document.getElementById("content").appendChild(my h1);
parent.frames["blog"].document.getElementById("content").appendChild(my p);
if(A.length>1)
{
mydiv = document.createElement("div");
mydiv.id="comments";
myh3 = document.createElement("h3");
myText = document.createTextNode("Comments:");
myh3.appendChild(myText);
mydiv.appendChild(myh3);
for(i=1;i<A.length;i++)
{
ax = A[i].split('|');
mydiv2 = document.createElement("div");
mydiv2.className = "comment";
myp = document.createElement("p");
myText = document.createTextNode(ax[2]);
myp.appendChild(myText);
mydiv2.appendChild(myp);
myp = document.createElement("p");
myp.className="by";
myText = document.createTextNode("By ");
myp.appendChild(myText);
mya = document.createElement("a");
mya.href = ax[1];
myText = document.createTextNode(ax[0]);
mya.appendChild(myText);
myp.appendChild(mya);
myText = document.createTextNode(" on " + ax[3]);
myp.appendChild(myText);
mydiv2.appendChild(myp);
mydiv.appendChild(mydiv2);
}

parent.frames["blog"].document.getElementById("content").appendChild(my div);
}
}
//Add coment
var response = '';
function addNewComment ()
{
var ENr =
parent.frames["blog"].document.getElementById("EntryNumber").value;
var CContent =
parent.frames["blog"].document.getElementById("CContent").value;
var CAuthor =
parent.frames["blog"].document.getElementById("CAuthor").value;
var CAuthorURL =
parent.frames["blog"].document.getElementById("CAuthorURL").value;
var CAuthorEmail =
parent.frames["blog"].document.getElementById("CAuthorEmail").value;
serverLoad("example_0230366/scripts/add_comment.php?ENr="+ENr+"&CContent="+CContent+"& CAuthor="+CAuthor+"&CAuthorURL="+CAuthorURL+"&CAut horEmail="+CAuthorEmail,"afterAdd_commentLoaded");
}
function afterAdd_commentLoaded()
{
var entryNumber, message, response;
response = parent.frames["Buffer"].document.buffer.line.value;
var ax = new Array();
ax = response.split('|');
serverLoad("example_0230366/scripts/show_entry.php?ENr="+ax[1],"afterShow_last_entryLoaded");
}
// Archives Module
var archives = '';
function show_archives()
{
parent.frames["blog"].document.getElementById("decoration").src
= "images/archive_blog.jpg";

serverLoad("example_0230366/scripts/list_entries_by_topics.php?","afterListEntriesByTo picsLoaded");
}
function afterListEntriesByTopicsLoaded()
{
deleteNodeChilds("content");

parent.frames["blog"].document.getElementById("feedback").style.display
= "none";
archives = parent.frames["Buffer"].document.buffer.line.value;
write_list_entries_by_topics();
}
function write_list_entries_by_topics()
{
var A = new Array();
var ax = new Array();
var myli,mya,myText,myh3;
A = archives.split('\n');
for(var i=0;i<A.length;i++)
{
ax = A[i].split('|');
myh3 = document.createElement("h3");
myText = document.createTextNode(ax[0]);
myh3.appendChild(myText);

parent.frames["blog"].document.getElementById("content").appendChild(my h3);
var myul = document.createElement("ul");
for(x=1;x<ax.length-2;x++)
{
myli = document.createElement("li");
mya = document.createElement("a");
mya.href = 'javascript:parent.frames["control"].showEntry("'+ax[x]+'")';
myText = document.createTextNode(ax[x+1]);
mya.appendChild(myText);
myli.appendChild(mya);
myText = document.createTextNode(" (" + ax[x+2]+")");
myli.appendChild(myText);
myul.appendChild(myli);
x = x+2;
}

parent.frames["blog"].document.getElementById("content").appendChild(my ul);
}
}
// Links
var links = '';
function show_links()
{
parent.frames["blog"].document.getElementById("decoration").src
= "images/links_blog.jpg";

serverLoad("example_0230366/scripts/show_links.php?","afterShowLinksLoaded");
}
function afterShowLinksLoaded()
{
links = parent.frames["Buffer"].document.buffer.line.value;
deleteNodeChilds("content");
parent.frames["blog"].document.getElementById("feedback").style.display
= "none";
write_links();
}
function write_links()
{
var A = new Array();
var ax = new Array();
var myli,mya,myText;
var myul = document.createElement("ul");
A = links.split('\n');
for(var i=0;i<A.length;i++)
{
ax = A[i].split('|');
myli = document.createElement("li");
mya = document.createElement("a");
mya.href = ax[0];
myText = document.createTextNode(ax[1]);
mya.appendChild(myText);
myli.appendChild(mya);
myul.appendChild(myli);
}
parent.frames["blog"].document.getElementById("content").appendChild(my ul);
}
-->
</script>
</head>
<body onLoad="initIt()"><p></p></body>
</html>
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
6
by: Shabam | last post by:
A web application of mine developed using C# + MS SQL runs fine normally. However when I stress test it with a load testing software (using about 60 simultaneous users) some instances start...
8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
0
by: doli | last post by:
Hi, I have the following piece of code which iterates through the potential errors: i =0 For Each error_item in myConn.Errors DTSPackageLog.WriteStringToLog myConn.Errors(i).Description...
2
by: Kavitha Rao | last post by:
Hi, I am getting the following errors while trying to run this snippet in Microsoft Visual C++.Can't seem to print the crc value stored. /* +++Date last modified: 05-Jul-1997 */ /* Crc - 32...
10
by: dbuchanan | last post by:
Hello, >From time to time my vb2005 form disappears and is replaced by the following errors. Rebuilding the application never helps. However the errors never affects the operation of my...
24
by: pat | last post by:
Hi everyone, I've got an exam in c++ in two days and one of the past questions is as follows. Identify 6 syntax and 2 possible runtime errors in this code: class demo {
3
by: clintonb | last post by:
Some programmers, and even Microsoft documents, say you should only throw exceptions for exceptional situations. So how are others handling all the other unexceptional errors? How are you...
11
by: Howard Kaikow | last post by:
I'm using the code below, but an error is not getting trapped. Where can such errors occur? In another process? Try SomeCode Catch ex As Exception Dim strMsg() As String = Split(ex.ToString,...
0
by: clemrock | last post by:
Help w/ errors.add_to_base between controller and model Hello, I'm having trouble in routing some errors between model and controller. The errors produced in the controller...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.