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

Tags: , ,

Sponsored Links


Error - null or not an object

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 26-11-2009
Solaris's Avatar
Member
 
Join Date: Apr 2008
Posts: 240
Error - null or not an object

Sponsored Links
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.

Reply With Quote
  #2  
Old 26-11-2009
opaper's Avatar
Member
 
Join Date: May 2008
Posts: 2,371
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.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #3  
Old 26-11-2009
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,382
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");
};
Reply With Quote
  #4  
Old 26-11-2009
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,839
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Error - null or not an object"
Thread Thread Starter Forum Replies Last Post
Null pointer error in java Elizabeth Allen Software Development 5 19-03-2010 02:26 PM
this.style is null or not an object D_chapple Software Development 3 03-12-2009 08:23 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
java error “javascript:void(null)” Kitaen Windows XP Support 3 27-07-2007 05:13 AM


All times are GMT +5.5. The time now is 03:05 PM.