Are you deliberately mixing Dojo 0.40 with Dojo 1.x?

The <s:head theme=ajax> tag includes resources for Dojo 0.40. In addition to that you're referenced a local dojo installation that includes Digit (1.x)

The "dojo undefined" message implies neither worked so there's a major error. Use FireBug to confirm that dojo.js is found.

sharath karnati wrote:
Hi All,
I'm getting below error message for this acrion(http://localhost:7001/hibernate/events/Dojo.action). dojo is not defined
       dojo.require("dijit.form.Button");
Please find my progrm: <html>
<head>
<s:head theme="ajax" debug="true"/>
<title>TooltipDialog demo</title>
  <script type="text/javascript">
    // Dojo configuration
    djConfig = {
     parseOnLoad: true,
        baseRelativePath: "<@s.url includeParams='none' value='/struts/dojo' 
includeParams='none' encode='false'/>",
        isDebug: true,
        bindEncoding: "${parameters.encoding}",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes };
</script>
<script type="text/javascript"
        src="<@s.url includeParams='none' value='/pages/dojoroot/dojo/dojo.js' 
includeParams='none' encode='false'/>">
</script>
<link href="<s:url value='/pages/dojoroot/dojo/resources/dojo.css'/>" rel='stylesheet' type='text/css' /> <link href="<s:url value='/pages/dojoroot/dijit/themes/tundra/tundra.css'/>" rel='stylesheet' type='text/css' /> <script type="text/javascript">
         dojo.require("dijit.Dialog");
            dojo.require("dijit.form.Button");
</script>
</head>
<body class="tundra">
  <button dojoType="dijit.form.Button" id="helloButton">
                        Hello World
                        <script type="dojo/method" event="onClick">
                                console.log('you pressed the button');
                                alert("You pressed the button.");
                        </script>
   </button>
</body>
</html> In struts.xml, I configured this program as below <action name="Dojo">
 <result>/pages/test1.jsp</result>
    </action>
dojoroot directory is in WEB-INF/pages directory. I'm using 'struts2-core-2.0.11.jar' Please let me know what is wrong in this code and how to correct this problem. Thanks in advance. Regards,
Sharath.

---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.1/1347 - Release Date: 27/03/2008 7:15 PM


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to