Hi folks,
i get problems testing widget declaration on firefox. IE6 works well.
How can i fix it? iam still in the planning phase and this error would be the killer to all further decisions concerning dojo.
the error message in the console:
[Exception...
"'Error: Could not load class 'TextField'. Did you spell the name
correctly and use a full path, like 'dijit.form.Button'?' when calling
method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
please help me!
Thank you in advance!
greetings
here is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dojo Toolkit Test Page</title>
<!-- load the dojo toolkit base -->
<script type="text/javascript" src="dojoroot/dojo/dojo.js"
djConfig="parseOnLoad:true, isDebug:true"></script>
<script type="text/javascript">
/* our JavaScript will go here -------------------------------------------------------------------------Declarations start*/
dojo.require("dijit.Declaration");
dojo.require("dojo.parser")
//-------------------------------------------------------------------------------------------------------- Declarations end
// a very common method of loading code onLoad
dojo.addOnLoad(function(){
// our dom is ready, get the node:
console.log("starting...");
});
//script ende--------------------------------------------------------------------------------------------*/
</script>
<style type="text/css">
/* our CSS can go here */
</style>
</head>
<body>
<!-- this is a Typical WebPage starting point ... -->
<!-- --------------------------------------------------------------------------------------------------Widget Declaration -->
<div dojoType="dijit.Declaration"
widgetClass="TextField" defaults="{defaultText:''}">
<input type="text" dojoAttachPoint="tNode" value="${defaultText}"/>
</div>
<!-- --------------------------------------------------------------------------------------------------Widget Declaration END -->
<div dojoType="TextField" defaultText="Type Here"></div>
</body>
</html>

hrmmm....
My guess here is that you're using using XHTML syntax for that input tag when you're in a straight-up HTML doctype. If Dojo can't find the closing for the Declaration, I can imagine that trying to create an instance of the class it's defining won't work.
Otherwise, your code looks good. Let me know if fixing the markup doesn't fix it.
Regards
Hmm....This is weard...I
Hmm....
This is weird...
I opened the page in firefox as source and saw that some parts of the code have been enclosed by the comment tags.
The solutions was to delete all comments in html ( <!-- xxx --> )
Now it works.
thank you for response!
greetings