Never mind. I told it to use the CDN Dojo, and it all works now.

How odd.

Andrew

On 10/09/2008, at 12:39 AM, Andrew Yager wrote:

Hi,

I suspect I'm just doing something inanely stupid and wrong, but I can't get Zend_Dojo form elements to work.

The page seems to load OK, and the form is visibly there, but there are JS errors which seem to prevent the Dojo elements from showing up.

Here is a base example of the HTML output from the action controller in case anyone can see something glaringly obvious wrong with this.

Thanks,
Andrew

---

<html>
<head>
   <title></title>


   <style type="text/css">
<!--
   @import "/js/dijit/themes/soria/soria.css";
-->
</style>

<script type="text/javascript" src="/js/dojo/dojo.js"></script>

<script type="text/javascript">
//<!--
dojo.require("dijit.form.ValidationTextBox");
   dojo.require("dijit.form.Form");
   dojo.require("dojo.parser");
dojo.addOnLoad(function() {
   dojo.forEach(zendDijits, function(info) {
       var n = dojo.byId(info.id);
       if (null != n) {
           dojo.attr(n, dojo.mixin({ id: info.id }, info.params));
       }
   })
   dojo.parser.parse();
});
var zendDijits = [{"id":"newUser-password2","params": {"trim":"true","lowercase":"true","regExp":"^[a-z0-9] {6,}$","invalidMessage":"Invalid password; must be at least 6 alphanumeric characters ","required":"true","dojoType":"dijit.form.ValidationTextBox"}}, {"id":"newUser","params":{"dojoType":"dijit.form.Form"}}];
//-->

</script>    </head>
<body class="soria">
   <style type="text/css" media="screen">
#backnext {
        border: none;
}
#backnext dl {
        display: inline;
        margin: 0;
}
#backnext dd {
        clear: none;
        float: none;
        width: none;
        display: inline;
}
#backnext dt {
        display: none;
}

</style>
<div id="registrationForm">
<form id="newUser" enctype="application/x-www-form-urlencoded" action="" method="post"> <dt><label for="newUser-password2" class="required">Password</ label></dt>
<dd>
<input id="newUser-password2" name="newUser[password2]" value="" type="password"></dd></form>
</div>    </body>
</html>


--
Andrew Yager, Managing Director   (MACS BCompSc MCP)
Real World Technology Solutions Pty Ltd
ph: 1300 798 718 or (02) 9037 0500
fax: (02) 9037 0591 mob: 0405 152 568
http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/


--
Andrew Yager, Managing Director   (MACS BCompSc MCP)
Real World Technology Solutions Pty Ltd
ph: 1300 798 718 or (02) 9037 0500
fax: (02) 9037 0591 mob: 0405 152 568
http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/

Reply via email to