Hi,
I'm trying to close a modal not with the [x] on the bottom right but with a button placed on the modal.
My code is the following :
<b:modal id="modal1">
<b:button>
<e:handler event="click">
<c:create destination="id('X')">
... action
</c:create>
var modal = bb.document.getElementById('modal1');
modal.close();
</e:handler>
Close
</b:button>
</b:modal>
<b:button>
<e:handler event="click">
<c:create destination="id('X')">
... action
</c:create>
var modal = bb.document.getElementById('modal1');
modal.close();
</e:handler>
Close
</b:button>
</b:modal>
This code doesn't work.
Have you got some similar example ?
Thanks by advance.

Modal close
5 March, 2008 - 13:25 — JoopTry
bb.document.getElementById('modal1').setAttribute('open',false);
Modal close
5 March, 2008 - 13:33 — LaureneThks Joop, but this try doesn't work at all.
Modal close
5 March, 2008 - 13:44 — JoopCopy of what works for me, perhaps it'll help.
<div style="font-size:150%;">Please select an order first</div>
<div style="margin-left:100px;; height:20px;">
<b:button>OK
<e:handler event="click" type="application/javascript"><![CDATA[
bb.document.getElementById('alertwin').setAttribute('open',false);
]]>
</e:handler>
</b:button>
</div>
</b:modal>
Close modal
5 March, 2008 - 14:07 — JoopStumbled on another one i use somewhere else
Close modal
5 March, 2008 - 19:14 — LaureneThanks a lot, This work very fine.
My problem was that I integrated at the same time in the handler, backbase code and javascript and it doesn't like. So with your solution I manage now to use only backbase code.
Thanks you.
laurene