To conditionally set the a div to a style of hidden you can simply use mv:attr<br><br>&lt;div mv:attr=&quot;:style =&gt; #{(@open_tasks.empty?)&nbsp; ?&nbsp; &#39;display:none&#39; :&nbsp; &#39; &#39;}&quot;&gt;<br>&nbsp; some html<br>&lt;/div&gt; 
<br><br>basically just using an inline conditional to determine what to set the style to<br>If you were wanting to do this a lot, then a custom directive could be created to simplify the syntax.<br><br><br>As for the form_remote you can do something like this
<br><br>&lt;form mv:form_remote=&quot;:html =&gt; { :id =&gt; &#39;order_form_open&#39;&nbsp; } &quot;&gt;<br>&lt;/form&gt;<br><br>We haven&#39;t updated the form directives to use the block style yet, but the above should do what you need.
<br><br>Have a Merry Christmas!<br><br>Jeff<br><br><br>-- <br>Jeff Barczewski, MasterView core team<br>Inspired Horizons Ruby on Rails Training and Consultancy<br><a href="http://inspiredhorizons.com/">http://inspiredhorizons.com/
</a><br><br><br><div class="gmail_quote">On Dec 24, 2007 2:52 AM, Nico Ritsche &lt;<a href="mailto:nico.ritsche@googlemail.com">nico.ritsche@googlemail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I&#39;m trying to conditionally hide a div tag. The only way I could get it working<br>is like this:<br><br>&lt;div mv:if=&quot;!@open_tasks.empty?&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <i>some html<br><br></i>&lt;/div&gt;
<br><br>&lt;div style=&#39;display:none&#39; mv:else=&quot;&quot;&gt;<br><br><i>&nbsp;&nbsp;&nbsp; same html</i><br><br>&lt;/div&gt;<br><br>However, I don&#39;t like it, as I have to repeat the same html twice. Is there a <br>better way of doing it?
<br><br>Another thing: Can I create a form_remote_tag with a parameter using <br>mv:form_remote? So far I only made it working using form_remote_tag<br>directly like this:<br><br>&nbsp;&nbsp;&nbsp;&nbsp; {{{ form_remote_tag :html =&gt; { :id =&gt; &#39;order_form_open&#39;&nbsp; } do}}}
<br><br>But I obviously like to avoid this as it shows up on the page.<br><br>Kind Regards,<br><font color="#888888">Nico<br>
</font><br>_______________________________________________<br>Masterview-users mailing list<br><a href="mailto:Masterview-users@rubyforge.org">Masterview-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/masterview-users" target="_blank">
http://rubyforge.org/mailman/listinfo/masterview-users</a><br></blockquote></div><br><br clear="all"><br>