Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , , , , , , , ,

Sponsored Links



this.style is null or not an object

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 03-12-2009
Member
 
Join Date: Nov 2009
Posts: 124
this.style is null or not an object

Hello Folks,

My project is stop running in the midway by giving the Microsoft JavaScript Runtime Error. The error which i am getting is occur dynamically. This happen every time when exception occurs at every postbag event in a Home.Aspx web page. The error is as follows:

Microsoft Jscript runtime error: 'this.style' is null or not an object

So now i need your help to get my program working perfectly. Thanks in advance. Waiting for reply
Reply With Quote
  #2  
Old 03-12-2009
ThoMas321's Avatar
Member
 
Join Date: Apr 2008
Posts: 4,078
Re: this.style is null or not an object

Hello,

If i am not wrong then you are using the onsubmit() method on the same function because of which your program is not responding. Its better to run it in the separate function to work properly to produce the the proper outcome. Here i am giving the code which will display the onsubmit() method in the separate function. So try your luck this time with the code given below.

form runat="server" onsubmit="frmfirst_onsubmit()" id="Default">
function frmfirst_onsubmit()
{
var _frmObj = document.getElementById('Default');
_frmObj.style.cursor = 'hold';
ShowXHideY('Hold for a moment', 'MainTable');
}
__________________
Ram requirement for various OS
Reply With Quote
  #3  
Old 03-12-2009
chroma's Avatar
Member
 
Join Date: Apr 2008
Posts: 2,144
Re: this.style is null or not an object

It is an Internet Explorer error caused by the attempt to access the non-existent style collection of document object. It can be corrected by changing a line in the "getOffsetParent' function by securing the "getStyle" from being called the document object.
Here is the example to change the line:

Code:
while ((element = element.parentNode) && element != document.body)
After converting the code:
while ((element = element.parentNode) && element != document.body && element != document)
Reply With Quote
  #4  
Old 03-12-2009
Member
 
Join Date: Feb 2009
Posts: 393
Re: this.style is null or not an object

First make sure that the ID of object which you are using is the object of the showError. It is because if you are using the UserControl or the MasterControl and then it is the server side control then ID could be recognized by the containers ID. For confirmation purpose to avoid this just right click on the page and go to the view source of the HTML and look for the control and check the generated ID property. That all i know about this.

Hope it will work. Thank you.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "this.style is null or not an object"
Thread Thread Starter Forum Replies Last Post
Getting HP AIO Device object server register class object failed message on my system Donoho Hardware Peripherals 6 06-06-2011 02:34 AM
Error - null or not an object Solaris Software Development 3 26-11-2009 02:35 PM
Elements is null or not an object KADRI Software Development 3 31-08-2009 05:45 PM
window.external' is null or not an object Kelewyn Technology & Internet 3 19-08-2009 08:58 PM
WinHttpDownloadFileToMemory(szURLDest, NULL, 0, NULL, NULL, NULL, &downloadBuffer) failed with hr=0x80190194 MartinH Server Update Service 1 12-07-2005 03:57 PM


All times are GMT +5.5. The time now is 05:18 AM.