Results 1 to 4 of 4

Thread: Error - null or not an object

  1. #1
    Join Date
    Apr 2008
    Posts
    240

    Error - null or not an object

    Hi
    I am using AS2 and javascript for interactions. I am working on a program, I am getting any error do not know what sort of error is this, I have posted my code. Please check
    Code:
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Actionscript Javascript Communication </title>
    
    <script src="swfobject.js" type="text/javascript"></script>
    		<script type="text/javascript">
    		swfobject.registerObject("myId", "9.0", "express.swf");
    		
    function rectextfla(Txt) {
    
    	document.getElementById('htmlText').value = Txt;
    
    }
    
    </script>
    
    </head>
    Any advice or suggestion on this.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Error - null or not an object

    Hi
    Truly speaking I did not understood your question. Firstly where is the error occurring. I think you have not posted the complete code. What about the swfobject.js code, we may need to see the code for that. You said you are getting the error message but you have not mentioned that what are you using to write the code. Please provide more information.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Error - null or not an object

    Hi
    I think the error is likely to be in getElementById('myId') or htmlText. I am not sure of that. Just go through the following code, it may help you.
    Code:
    var comflash = function(whatid) {
        var tarobject = document.getElementById(whatid);
        if (!tarobject) {
            alert("something is wrong, can't find " +whatid+ " in the DOM");
            return;
        }
          try {      tarobject.sendTextFromHtml(document.getElementById("htmlText").value); // reference field correctly in DOM!  
        }
        catch(e) {
            alert("could not complete sending...");
        }
    };
    
    document.getElementById("sendToFlash").onclick = function() {
        comflash("myId");
    };

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Error - null or not an object

    Hi
    I think you should use a good software / application for coding. The advantage is that you will get better information about the error. I think you should use something like Firebug for Firefox to debug the stuff. Firebug is really a powerful plugin of Firefox for bugging. If you use the normal software / applications then you will get the ugly errors, so its better you use a software / application such as firebug. Hope you will have firebug soon.

Similar Threads

  1. Null pointer error in java
    By Elizabeth Allen in forum Software Development
    Replies: 5
    Last Post: 19-03-2010, 02:26 PM
  2. this.style is null or not an object
    By D_chapple in forum Software Development
    Replies: 3
    Last Post: 03-12-2009, 09:23 PM
  3. Elements is null or not an object
    By KADRI in forum Software Development
    Replies: 3
    Last Post: 31-08-2009, 04:45 PM
  4. window.external' is null or not an object
    By Kelewyn in forum Technology & Internet
    Replies: 3
    Last Post: 19-08-2009, 07:58 PM
  5. java error “javascript:void(null)”
    By Kitaen in forum Windows XP Support
    Replies: 3
    Last Post: 27-07-2007, 05:13 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,881,290.34196 seconds with 17 queries