Search
Other Modals questions
Forum

add a close button to php override

Anne Garger's Avatar Anne Garger
I created a php override for a component I want to show as a modal, it works except for the close button. Here is code from the php file
<style>.modal {
                padding:20px;}</style>

<div id="te_contact" [b]class="modal"[/b] personid-<?php echo $this->contact->id ?> <?php echo $this->pageclass_sfx ?><?php echo $this->isMobile ? ' mobile' : ''; ?>" >

When I add this code
<p><a class="btn btn-danger" onclick="parent.jQuery.rl_modals.close();">Close this Modal</a></p>

The button shows up but it doesn't close when clicked, what am I doing wrong
Peter van Westen's Avatar Peter van Westen ADMIN
Are you using the iframe mode to open the modal?
Do you get a javascript error in your browser console?
Please post a rating at the Joomla! Extensions Directory
Anne Garger's Avatar Anne Garger
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Try without the parent prefix.
See:
onclick="jQuery.rl_modals.close();"
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription