Close a blank application when it shows as a modal window

This is quite annoying when nothing is ever done. What’s the point if tech support ignores the dev users?

Hello,

Please contact our support regarding this issue. Our chat is active on workdays from 8:00am to 6:00pm (GMT -3), and our ticket system is always available.

regards,
Bernhard Bernsmann

in every framework, there will be some missing points.
i have tried my best and it’s not available today. perhaps with this thread, they will add this feature in the next release.

*i sent this suggestion to netmake, hoping they will hear this simple suggestion.

Indeed! There’s nothing wrong with missing features, that’s what new versions are about. But it’s hard to find out which suggestions are taken into account and which not.

Hi. I have exact same problem. I have a page of info generated in a blank app, opened on top of a form using a button as link, but now there is no X to close the modal :frowning:

How was this resolved? Did SC every change for SC V7 or not?

I did just try this and it closes it OK, by reloading the original underlying app:

?>
<a href="…/move_thru_order_days/move_thru_order_days.php" target=’_parent’ style=‘text-decoration: none;’ ><button style=‘background-color: #2F5BB7; color: white;’ >Return to OrderingClose</button></a>
<?php
This is SC V6

This definitely works. Using the target as _parent got me back far enough into the frame of the menu. I have also used the iframe NAME (not ID) as target elsewhere in my code, and that works as well.

Peace

1 Like

Hi,
just an update. Figured that SC using Thickbox for the modal window, so all you have to do is:

echo “<script>window.parent.tb_remove();</script>”;

at the end of your script. Done!

Later on
jsb

2 Likes

a real solution from jsbinca

hi jsbinca,

what should i say? you are a genius.
your script echo “<script>window.parent.tb_remove();</script>”; is working for auto close the form if it is placed in the bottom of the code in a blank application (at the end of the script).

so i modify (combine with the previous solution from the SC technical support) like this:
?>

<script>

function CloseModal()
{
	window.parent.tb_remove();
}

</script>

<center><input type = “button” name = “btn_return” value = “Close” onClick = ‘Javascript:CloseModal();’></center>

<?php

i paste this code, let’s say in the middle or top of the script, then it’s completely working. now i have a button to close a blank application when it’s shown as a modal.

*ladies & gentlemen, now we have a good solution thanks to jsbinca

many thanks, jsbinca :slight_smile:

3 Likes

this is a fix cause was not shoing the button
asi si funciona on modal windows

			?>
			<script>
			function CloseModal()
			{
				window.parent.tb_remove();
			}
			</script>
				<center><button type="button" onclick="javascript:CloseModal()"> Cerrar </button></center>
			<?php
1 Like

Solved!!

I worked with a button link, linked to a blank app, in this blank app type this code:

$cadena = “url1”.{identificacion}."#ABC2";

			<button  href="javascript: self.parent.tb_remove()" id="sc_b_sai_t" onclick="self.parent.tb_remove(); return false;" title="<?php echo{lang_btns_back}; ?>" style="self-align: right; display:flex; background-color:red; color: #fff; border: none;"><i class="fas fa-sign-out-alt"></i><?php echo{lang_btns_back}; ?></button>
			<?php 

echo ‘

As you can see I use an iframe for expose my $cadena which is my url. And in the button link you configure the open type as modal. And done. The button is made in html for closing the modal windows.