Problem with dojo dijit.form.ValidationTextBox

The following XHTML code does not work:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="/dojotoolkit/dijit/themes/tundra/tundra.css" />
    <link rel="stylesheet" type="text/css" href="/dojotoolkit/dojo/resources/dojo.css" />
    <script type="text/javascript" src="/dojotoolkit/dojo/dojo.js" djConfig="parseOnLoad: true" />
    <script type="text/javascript">
        dojo.require("dijit.form.ValidationTextBox");
        dojo.require("dojo.parser");
    </script>
</head>

<body class="nihilo">
    <input type="text" dojoType="dijit.form.ValidationTextBox" size="30" />
</body>

</html>

The following error message appears in Firebug:

[Exception ... "The component returned the error code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: 21: dojt / dojo // local dojo // dojo local js :: anonymous :: line 319 ": none] http: // localhost: 21000 / dojotoolkit / dojo / dojo.js line 319

Any idea what's wrong?

+3
source share
6 answers

The problem is the completion of the file ...

Content-Type apache.

  • .html Content-Type/html; = ISO-8859-1
  • .xhtml Content-Type/xhtml + xml
+2

dojo.js:

<script type="text/javascript" src="/dojotoolkit/dojo/dojo.js" djConfig="parseOnLoad: true"/>

:

<script type="text/javascript" src="/dojotoolkit/dojo/dojo.js" djConfig="parseOnLoad:true"></script>

dojo, .

+1

, innerHTML , W3C , , , XHTML, HTML . . .

+1

, dojo.js, 319?

0

, script?

, .

Dojo , - .

I am on OS X using firefox 3.0.1 I am not getting errors under firebug.

0
source

There are several similar tickets on the dojo trac page:

http://trac.dojotoolkit.org/search?q=xhtml+ns_error&noquickjump=1&ticket=on

You are likely to encounter an error and you will need to fill out a new ticket.

0
source

Source: https://habr.com/ru/post/1696716/


All Articles