473,708 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error message "object required"

110 New Member
On a webpage that has a variety of questions I get an "object required" error on lines like this...

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('tableQuestion17').style.visibility="visible";
  2.  
This is the code for the table "tableQuestion1 7"

Expand|Select|Wrap|Line Numbers
  1. <table border="0" width="100%" id="tableQuestion17" cellpadding="0" style="visibility:hidden">
  2.             <tr>
  3.                   <td bgcolor="#003300" style="padding-right: 5px" width="55%">
  4.                   <p align="right"><b>
  5.                   <font color="#FFFFFF" size="2" face="Arial Narrow">Specify 
  6.                   other method:</font></b></td>
  7.                   <td width="45%" style="border: 1px solid #003300; padding-left: 3px; padding-top: 3px; padding-bottom: 3px">
  8.                  <input type="text" name="otherMethod" id="otherMethod" onChange="javascript:question('17')" size="60" style="border: 1px solid #003300; font-family:Arial Narrow; font-size:10pt; color:#000080;" tabindex="-1" ></td>
  9.                 </tr>
  10.           </table>
  11.  
I really don't get it. Why does javascript not accept this object?
Jan 12 '09 #1
10 7635
acoder
16,027 Recognized Expert Moderator MVP
Where does this line get called?
Jan 12 '09 #2
andersond
110 New Member
onChange="javas cript:question( '17')"
Jan 12 '09 #3
acoder
16,027 Recognized Expert Moderator MVP
OK, can you post the question() function code.
Jan 12 '09 #4
andersond
110 New Member
The entire function is over 1200 lines; and, I know you don't really want that, here is the portion in question

Expand|Select|Wrap|Line Numbers
  1. function question(x){
  2.  
  3.  if(x=="17"){// describe the 'other' method
  4.    document.getElementById('tableCompletionFeedback').background="../Images/completionBLUE51%25.jpg";
  5.    document.getElementById('percent').style.fontFamily="Arial Narrow"; 
  6.    document.getElementById('percent').style.fontSize="10pt";
  7.    document.getElementById('percent').align="right";
  8.    document.getElementById('percent').innerHTML="51% complete"; 
  9.    document.getElementById('tableQuestion18').swapNode(document.getElementById('tableRow3'));
  10.    document.getElementById('tableQuestion18').style.visibility="visible";
  11.    document.getElementById('tableQuestion18').id="item3";
  12.    document.getElementById('cellOutput17').style.fontFamily="Arial Narrow"; 
  13.    document.getElementById('cellOutput17').style.fontSize="10pt"; 
  14.    document.getElementById('cellOutput17').innerHTML="Valuation method is: "+rtrim(document.getElementById('otherMethod').value);
  15.    document.getElementById('coinsurance').focus();
  16.    }
  17. }
  18.  
Jan 12 '09 #5
acoder
16,027 Recognized Expert Moderator MVP
There's no swapNode method. Have you added it via prototype?
Jan 12 '09 #6
andersond
110 New Member
Trust me the problem is within the code I have already posted. But just for good measure, here's swapNode, which is a function I have used time and again.

Expand|Select|Wrap|Line Numbers
  1. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  2. <title>Vacant Buildings Submission Manager</title>
  3. <script type="text/javascript; version=1.5">
  4. Node.prototype.swapNode = function (node) {
  5.   var nextSibling = this.nextSibling;
  6.   var parentNode = this.parentNode;
  7.   node.parentNode.replaceChild(this, node);
  8.   parentNode.insertBefore(node, nextSibling);
  9.   }  
  10. </script>
  11.  
Jan 13 '09 #7
andersond
110 New Member
I should also mention that it displays the error message but it still performs the function as it is supposed to do.
Jan 13 '09 #8
acoder
16,027 Recognized Expert Moderator MVP
@andersond
which does answer my question - you added it via prototype.

The error message makes me think it's in IE. Have you tried other browsers for something more useful?
Jan 14 '09 #9
andersond
110 New Member
FireFox gets so bogged down with "object has no properties" messages that it crashes before it ever gets to this point. But, it has to work in IE. Our website tracking software says that every one of our clients uses IE.
Jan 14 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1912
by: M D | last post by:
For the code see MS knowledge base #310273. All I did was comment out the parts for adding an attachment and put real values in for smtpServer & email addresses. For the SmtpServer I used my email providers entry point which they refered to as "smtp server for asp mail" and I'm wondering if it's the asp aspect. .NET has no documentation on CDO.Message and msdn brings up references to MS Office & Outlook.
2
1562
by: tJ | last post by:
Hi I'm working on a form with a splitControl. In the RHS panel2, I need to add a panel to drop radioButtons onto. But when i do this, I get the following error message: "Object reference not set to an instance of an object" Can anyone please tell me how i can solve this problem? Thanks in advance,
3
1935
by: Jibu | last post by:
Hi I am using SmtpMail class for mail sending. I could able to send mail using my mailse server to our LAN. But when I tried external addresses it showed the exception Message "Could not access 'CDO.Message' object.". Can anybody help me to solve this probelm
1
2698
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our system administrator will not allow relaying. In the ASP.Net web.config file I let the web application...
3
9256
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our system administrator will not allow relaying. In the ASP.Net web.config file I let the web application...
4
3976
by: Liz Patton | last post by:
Here's the exception: System.Exception: Unable to send mail: Could not access 'CDO.Message' object. ---> System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Unspecified error --- End of inner exception stack trace ---
18
28755
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 0, 0) Why is this? Marc
2
2977
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 to the same page at the top of my form alerting the user that their request has been approved or denied. However, the end result is an error message: Error Message: Object reference not set to an instance of an object.
5
22118
by: DaFallus | last post by:
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"
4
3096
by: Phil | last post by:
Hi, This code gives an javascript error: "Object required" and never let see the Alert window. in code-behind: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Hiddenfield1.value="end text" end sub
0
9290
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9159
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9061
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7925
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4713
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3151
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2508
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2097
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.