|
| ||||||||||
| Tags: javascript, null, scripting language |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Error - null or not an object
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> |
|
#2
| ||||
| ||||
| 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 |
|
#3
| ||||
| ||||
| 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");
};
__________________ Grand Theft Auto 4 PC Video Game |
|
#4
| ||||
| ||||
| 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. |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |