Note that there are some explanatory texts on larger screens.

plurals
  1. POMaking dijit.Dialog Transparent when it shows up
    primarykey
    data
    text
    <p>I have a <code>Dojo Dialog box</code> using <code>dijit.Dialog</code> library. It shows up on a <code>Rowclick</code> event of a <code>Dojo grid</code>. Now when it shows up I want it to be Transparent or reduce its opacity so that Whatever was in my background i can see it and it will look good. My Dialog box is a simple <code>&lt;div&gt; with data-dojo-type="dijit.Dialog"</code>. </p> <p>The code is :: </p> <pre><code>&lt;div id="terms" name ="hi" data-dojo-type="dijit.Dialog" style="height:580px;width:900px;" data-dojo-props="title:'Control Activities'" preload="true"&gt; &lt;center&gt;&lt;p&gt;&lt;strong&gt;EDIT AN ACTIVITY &lt;/strong&gt;&lt;/p&gt;&lt;/center&gt; &lt;center&gt;&lt;table&gt; &lt;tr style="height: 50px"&gt; &lt;td style="width: 150px" align="right"&gt;&lt;b&gt;ASSIGNED BY : &amp;nbsp&amp;nbsp&amp;nbsp&lt;/b&gt;&lt;/td&gt; &lt;td style="width: 600px" align="left"&gt;&lt;div id="plets"&gt;&lt;input dojoType="dijit.form.ValidationTextBox" id="dassignedbyid" name="dassignedbyname" onfocus="hello()" required="true"&gt;&lt;/div&gt; &lt;span dojoType="dijit.Tooltip" connectId="dassignedbyid"&gt;Enter Name&lt;/span&gt;&lt;/td&gt; &lt;td style="width: 150px" align="right"&gt;&lt;b&gt;ASSIGNED TO : &amp;nbsp&amp;nbsp&amp;nbsp&lt;/b&gt;&lt;/td&gt; &lt;td style="width: 600px" align="left"&gt;&lt;div id="plets1"&gt;&lt;input dojoType="dijit.form.ValidationTextBox" id="dassignedtoid" name="dassignedtoname" onfocus="hello()" required="true"&gt;&lt;/div&gt; &lt;span dojoType="dijit.Tooltip" connectId="dassignedtoid"&gt;Enter Name&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;&lt;/center&gt; &lt;/div&gt; </code></pre> <p>And the <code>Dialog box id= terms</code> shows up on this code :: </p> <pre><code>dojo.connect(grid, "onRowClick", grid, function(){ var items = grid.selection.getSelected(); dojo.forEach(items, function(item){ var v = grid.store.getValue(item, "ActID"); getdetailsfordialog(v); function showDialog(){ dojo.require('dijit.Tooltip'); dijit.byId("terms").show(); document.getElementById('closelabelspan').style.display = 'none'; document.getElementById('holdlabelspan').style.display = 'none'; document.getElementById('startlabelspan').style.display = 'none'; document.getElementById('cancellabelspan').style.display = 'none'; document.getElementById('updatelabelspan').style.display = 'none'; } showDialog(); }, grid); }); </code></pre> <p>Now i want that when this <code>dialog box(terms)</code> pops up it is transparent. I have tried one CSS also but that ain't working for me ::</p> <pre><code>&lt;style&gt; div.transbox { width:900px; height:580px; background-color:#FFFFFF; border:2px solid black; opacity:0.6; filter:alpha(opacity=60); /* For IE8 and earlier */ } &lt;/style&gt; </code></pre> <p>I am using IE8.</p> <p>How to do this ? Thanks .. </p> <p>Function <code>showDialog()</code> edited :: </p> <pre><code>function showDialog(){ dojo.require('dijit.Tooltip'); dijit.byId("terms").on("show", function() { dojo.style(this.domNode, "opacity", 0.3); }); dijit.byId("terms").show(); document.getElementById('closelabelspan').style.display = 'none'; document.getElementById('holdlabelspan').style.display = 'none'; document.getElementById('startlabelspan').style.display = 'none'; document.getElementById('cancellabelspan').style.display = 'none'; document.getElementById('updatelabelspan').style.display = 'none'; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload