Tried to register widget with ID = content but that ID is already registered

Source: Internet
Author: User

Problem: The following is the error code: tried to register widget with ID = content but that ID is already registered

1 <! -- Dojo configuration --> 2 <SCRIPT type = "text/JavaScript"> 3 var dojoconfig = {4 parseonload: True, // when the Dom and all initial dependencies are loaded, parse the page using dojo/parser. It is recommended to set it to false (or omitted), and then explicitly reference the dojo/parser to call parser. parse (). 5 packages: [6 {name: "test", Location: "/JS/myjs/test"} 7], // set the module path 8}; 9 10 parser. parse (); 11 </SCRIPT>
View code

Cause: parseonload: True is the same as parser. parse (). It parses the interface twice.

Id = content is registered twice, and an error is reported during the second registration.

Solution: Change parseonload: True to false or delete parser. parse ();

Tried to register widget with ID = content but that ID is already registered

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.