Need to popup a window showing php form

Notice: This thread is very old.
frocco
Member | 46
+
0
-

Hello,

What is the easiest way to show a form in a popup windows in nette?

Thanks

greeny
Member | 405
+
0
-

Written by memory, not tested, but can be used as basic draft (if this is what you ask about):

<style>
.popup {
	display: none;
	/* some other styles */
}
</style>
<a href="#" data-popup="#my-popup">Show form</a>

<div class="popup" id="my-popup">
{control popupForm}
</div>

<script>
$("[data-popup]").on("click", function (e) {
	e.preventDefault();
	$($(this).data("popup")).show();
});
</script>
frocco
Member | 46
+
0
-

Thank you,
Works good..

Need to add hide button and resize window.