Custom Menu with blank app

Hello,

I wan’t to create a custom menu with buttons on a blank aplicattion.
The problem is that redirects me directly to the grid without pressing the button.

Can somebody help me?

I have this code on execute event

?>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<button type="button" class="btn btn-primary btn-lg" onclick="<?php sc_redir(grid_clientes); ?>">Clientes</button>
    
<?php

You cannot call a PHP function from Javascript

You have to use something like this

<button type = “button” class = “btn btn-primary btn-lg” onclick = “window.location.href=\”…/grid_clientes/index.php\"">

Your code did not work for me
Attached modified code

?>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
   
<button type = "button" class = "btn btn-primary btn-lg" onclick = "window.location.href='../grid_clientes/index.php';">Clientes
	
<?php

You just replace the \" with ', which is exactly the same

And how would I make the applications open in tabs?
And if I want to open an application in insert mode?

Is it safe to use this method?

I don’t think that you can open App in menu tabs

To open in insert mode you need to use sc_apl_conf(), but it need to be done outside the javascript

I don’t have access to my system right now to check it out, but this should be pretty straightforward. It just needs to be thought about slightly differently.

Create a blank application with the relevant button(s)
the onclick event of the button needs to call a PHP function that uses sc_redir to the new app. if you want it in insert mode, then use the sc_apl_conf() macro first.

I can’t remember without trying it whether you have to fiddle with it to avoid PHP/Javascript confustion.

I have a feeling that the last time I did it, I used a standard button in an app (possibly control) so that I could avoid the Javascript.