|
| ||||||||||
| Tags: aspx, default, frmobj, getelementbyid, jscript, microsoft, null, runat, runtime error, style, thisstyle, web page |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| this.style is null or not an object
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 |
|
#2
| ||||
| ||||
| 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 |
|
#3
| ||||
| ||||
| 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) |
|
#4
| |||
| |||
| 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. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "this.style is null or not an object" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to make single page into Landscape page style and rest of them in default style in OpenOffice? | Hridayeshu | Windows Software | 4 | 19-02-2012 03:29 PM |
| Getting HP AIO Device object server register class object failed message on my system | Donoho | Hardware Peripherals | 6 | 06-06-2011 01:34 AM |
| Error - null or not an object | Solaris | Software Development | 3 | 26-11-2009 01:35 PM |
| Elements is null or not an object | KADRI | Software Development | 3 | 31-08-2009 04:45 PM |
| window.external' is null or not an object | Kelewyn | Technology & Internet | 3 | 19-08-2009 07:58 PM |