Currently, I am trying to grasp the concepts of Dojotoolkit and my objective is to display a form when a button is clicked. Upon reviewing other examples, my code seems correct to me; however, there appears to be something crucial that I am overlooking but unable to pinpoint.
I would truly appreciate any advice or assistance on this matter!
<button id="slog">Login</button> or <button id="rlog">Register</button>?
<div id="anim8target" style="opacity: 0">
<form action="login.jsp" method="POST">
<fieldset><legend>Login</legend>
Username: <input type="text" name="username"><br><br>
Password: <input type="passwor" name="password"><br><br>
<input type="input" value="Login">
</fieldset>
</form>
</div>
<div id="anim8target" style="opacity: 0">
<form action="register.jsp" method="POST">
<fieldset><legend>Register</legend>
Username: <input type="text" name="username"><br><br>
Display name: <input type="text" name="dname"><br><br>
Email: <input type="text" name="email"><br><br>
Password: <input type="passwor" name="password"><br><br>
<input type="input" value="Register">
</fieldset>
</form>
</div>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js" data-
dojo-config="isDebug: 1, async: 1, parseOnLoad: 1"></script>
<script>
require(["dojo/_base/fx", "dojo/on", "dojo/dom", "dojo/domReady!"], function
(baseFx, on, dom) {
var loginButton = dom.byId("slog"),
registerBUtton = dom.byId("sreg"),
anim8target = dom.byId("anim8target");
on(loginButton, "click", function(evt){
baseFx.animateProperty({
node: anim8target,
properties: {
opacity: 1 }
}).play();
});
});
</script>