Login Register

Master detail with dijits

Hello everybody,

I am pretty sure my problem is kind of silly but I do not how to solve it, any help will be really appreciate.
I have a textbox to capture document (master section), with that document I want to bring and capture some other data (detail section), so, I need to use dijits in deatil section. I am testing with dojo.xhrGet and detail page is load but dijits loose their dojo properties, for instance, a validation text box does not validate data anymore. any ideas? I am sending the code for a beter understanding.

Thanks a lot in advanced.

---------index.html (master and detail) ----------------

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ValidationTextBox Demo</title>
<!--DOJO-->
<style type="text/css">
        @import "./dojoroot/dojo/resources/dojo.css";
        @import "./dojoroot/dijit/themes/tundra/tundra.css";
</style>
<!--Dojo requeriment-->
<script type="text/javascript" src="./dojoroot/dojo/dojo.js"
    djConfig="parseOnLoad: true, extraLocale: ['en-us', 'ar-sy', 'es-es', 'zh-cn']">
</script>

<script type="text/javascript">
    dojo.require("dojo.parser"); // scan page for widgets       
       
    dojo.require("dijit.form.ValidationTextBox");
       
        function loadDetail(){
                dojo.xhrGet({
                        url: "./requiredTextBox.html",
                        load: function(response, ioArgs){
                                dojo.byId("divDetail").innerHTML = response;
                                return response;
                        },
                        error: function(response, ioArgs) {
                                dojo.byId("divDetail").innerHTML = "something is going wrong";
                                return response;
                        }
                });
        };
</script>
</head>
<body class="tundra">
        Master: <input type="text" name="document" class="medium" value="Document" id="document"
                dojoType="dijit.form.ValidationTextBox"
                regExp="[\w]+"
                required="true"
                invalidMessage="Invalid Non-Space Text.">

        <input type="button" name="loadDetail" id="loadDetail" value="Load detail" onclick="loadDetail()">
                Detail: <div id="divDetail">Detail will be here</div>
</body>

------------requiredTextBox.html (detail I want to load)-------------

looks like you just need to

looks like you just need to parse the incoming html:

load: function(response){ var n = dojo.byId("divDetail"); n.innerHTML = response; dojo.parser.parse(n); }