how to use dojo.setStyle for setting the color -


i having 2 questions respect above program

  1. the width of button appearing small

  2. how can change color of button programatically means onclick of button have function?

    dojo.setstyle("bid" ,"color" ,"red");

but both aren't working

<html>   <head>    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/>   <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djconfig="parseonload: true">  </script>     <script>          dojo.require("dijit.form.button");     </script>   </head>   <body class="claro"> <div  dojotype="dijit.form.button" id="bid" style="color: green;width: 335px; font-size:12px;"></div>save  </body> </html> 

the method want style, not setstyle, use:

dojo.style("bid", "color", "red"); 

to make button bigger, put text in div:

<div  dojotype="dijit.form.button" id="bid" style="color: green;width: 335px; font-size:12px;">save</div> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -