473,397 Members | 2,099 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,397 software developers and data experts.

"Object Required" error

I'm trying to write a somewhat simple page with dependent drop-down
boxes. Unfortunately the entire page is written through PL/SQL so that
makes it even more difficult for me to trouble shoot. I know hardly
anything when it comes to JavaScript, and I keep getting an error
saying:
"Error: Object required
Line: 31
Char: 1
Code: 0"

The funny thing is that I ONLY get this error with Internet Explorer.
The page works just fine in Firefox but most of my clients will be
using IE so this has been driving me nuts. Here is the code on the page
that is throwing the error (the page is displayed in a hidden frame).

<script language="javascript">
function lookUp( cntry_name )
{
document.forms[0].p_cntry_name.value = cntry_name;
document.forms[0].submit();
}
</script>

<script language="javascript">
function lookUpCounty( state_name )
{
document.forms[0].p_state_name.value = state_name;
document.forms[0].submit();
}
</script>

<script language="javascript">
function lookUpWell(welltype)
{
document.forms[0].well_type.value = welltype;
document.forms[0].submit();
}
</script>
<FORM ACTION="dev_dcd.frame_hidden" METHOD="POST">
<INPUT TYPE="hidden" NAME="p_cntry_name" VALUE="">
<INPUT TYPE="hidden" NAME="p_state_name" VALUE="">
<INPUT TYPE="hidden" NAME="p_county_name" VALUE="">
</FORM>
<script language="javascript">
with( parent.mainFrame )
{
addToList( "No Options", "" );
document.forms[0].p_county_name.length = 0;
addCounty( "No Options", "" );
document.forms[0].p_county_name.selectedIndex = 0;
}
</script>

Any help will be greatly appreciated!

Sep 7 '06 #1
5 22100
VK
DaFallus wrote:
"Error: Object required
Line: 31
Char: 1
Code: 0"

The funny thing is that I ONLY get this error with Internet Explorer.
You get the same kind of error in Firefox either. The reason you don't
see it is that Firefox silently registers JavaScript errors into
JavaScript console (select Tools JavaScript Console and here we are).

Both are complaining on the line
with( parent.mainFrame )
because indeed there is no such object on a stay-alone page (not
uncluded into frameset with a frame named mainFrame).
If this is indeed a frameset, it is necessary to see it in whole.

Sep 7 '06 #2
I'm not exactly sure what you mean. Do I need to use
parent.frames['frame_main'] instead of parent.mainFrame. As I
understand it a "with" statement changes the scope so that you don't
have to write the full path of an object. Like I said, I don't really
know much about JavaScript so if you could offer some more specific
advice I'd really really appreciate it.

Also, I do see now that Firefox is receiving errors, and they are more
detailed than the errors IE is giving me. However, why is it that the
page functions normally in Firefox despite these JavaScript errors and
IE won't let me submit the page?

VK wrote:
DaFallus wrote:
"Error: Object required
Line: 31
Char: 1
Code: 0"

The funny thing is that I ONLY get this error with Internet Explorer.

You get the same kind of error in Firefox either. The reason you don't
see it is that Firefox silently registers JavaScript errors into
JavaScript console (select Tools JavaScript Console and here we are).

Both are complaining on the line
with( parent.mainFrame )
because indeed there is no such object on a stay-alone page (not
uncluded into frameset with a frame named mainFrame).
If this is indeed a frameset, it is necessary to see it in whole.
Sep 7 '06 #3
VK

DaFallus wrote:
I'm not exactly sure what you mean. Do I need to use
parent.frames['frame_main'] instead of parent.mainFrame.
I mean to say that in the posted code you are trying to communicate
with some objects (function, form, form elements) located on another
HTML page - in the frame called "mainFrame". If it is the case then I
need to see the whole frameset structure, thus the page containing
<frameset>
....
</frameset>
definition as well as the content of the page you are trying to
communicate with (the one named "mainFrame")

If you don't have a page with a frameset definition and the originally
posted code supposes to run on a stay-alone page, then your usage of
parent.frames[frameName] construct is wrong and you are thinking of
"parent" and "frame" something what they are not. In this case please
post in full the problematic page (or give a link to it).

Sep 7 '06 #4
If you don't mind, I'd like to email the code to you since all three
pages together is just over 200 lines.

VK wrote:
DaFallus wrote:
I'm not exactly sure what you mean. Do I need to use
parent.frames['frame_main'] instead of parent.mainFrame.

I mean to say that in the posted code you are trying to communicate
with some objects (function, form, form elements) located on another
HTML page - in the frame called "mainFrame". If it is the case then I
need to see the whole frameset structure, thus the page containing
<frameset>
...
</frameset>
definition as well as the content of the page you are trying to
communicate with (the one named "mainFrame")

If you don't have a page with a frameset definition and the originally
posted code supposes to run on a stay-alone page, then your usage of
parent.frames[frameName] construct is wrong and you are thinking of
"parent" and "frame" something what they are not. In this case please
post in full the problematic page (or give a link to it).
Sep 7 '06 #5
VK

DaFallus wrote:
If you don't mind, I'd like to email the code to you since all three
pages together is just over 200 lines.
Go ahead. My address in this group is a real one.

Sep 7 '06 #6

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

Similar topics

2
by: Dave Hammond | last post by:
I've got what should be a simple assignment of either an element value or a default string to a variable, but when the element doesn't exist I get an "Object required" error rather than an...
7
by: deko | last post by:
I'm getting intermittent "Object Invalid or No Longer Set" errors in my Access 2002 mdb. What causes these errors? Has anyone dealt with this before? I can't trace it because it's not easy...
6
by: Lauchlan M | last post by:
Hi. Usin ASP.NET, getting an "Object reference not set to an instance of an object" error. In my login.aspx page I have: string arrUserRoles = new string {"UserRole"};...
1
by: Kamal | last post by:
I am trying to send mail through smtp. smtp service is running on my machine. But every time during the smtpmail.send(msg) call gives "Could not access 'CDO.Message' object." error. Could some...
1
by: Lauchlan M | last post by:
Hi. I'm using ASP.NET, getting an "Object reference not set to an instance of an object" error. In my login.aspx page I have: string arrUserRoles = new string {"UserRole"};...
2
by: chuckdfoster | last post by:
I am getting a "Could Not Access CDO.Message Object" Error when I try to use the following code to send an email via ASP.NET. When I run this on one machine it works, on another one it doesn't. ...
7
by: dhnriverside | last post by:
Hi peeps I'm just following this HOW-TO from MSDN.. http://support.microsoft.com/default.aspx?scid=kb;en-us;306355 But I've got a problem. I've adding the #using System.Diagnostics; line to...
2
by: louie.hutzel | last post by:
This JUST started happening, I don't remember changing any code: When I click the submit button on my form, stuff is supposed to happen (which it does correctly) and a result message is posted back...
0
by: piyumi80 | last post by:
hi, i wrote the following code to get a specific data row from the data set.but it generates the "Object reference not set to an instance of an object.".....error private void...
10
by: andersond | last post by:
On a webpage that has a variety of questions I get an "object required" error on lines like this... document.getElementById('tableQuestion17').style.visibility="visible"; This is the code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.