Close form fron sc_redir

I have a app. control with a sc_redir into app grid. It does another sc_redir into app form.
Now I want to close the form a return a menu. But

  • with sc_exit return a last app.
  • with sc_redir(menu) it create another menu below the first menu.

is there anybody th can help me.?

thanks

Test this code:

$_glo_Site = 'https://www.you_site_menu.com';

$_execute = "
<script type='text/javascript'>
    if (parent !== self) {
		window.parent.location = '".$_glo_Site."';
	} else {
	    window.location.href = '".$_glo_Site."';
	}
</script>";
echo $_execute;

thanks again. I will try it

I tried with this and it worked. but now it come up a new issue.
my application consists :slight_smile:

  • app .menu
  • app. blank create a new register of the a table.
    • from this .I do a sc_redir to app. Grid with [_Pedido] parameter
      app.Grid execute its SQL with this parameter [Pedido]
      from this app.Grid I have a button it does a sc_redir a app Form with _PedidoT03 parameter
      • App.form it execute a SQL with this parameter. it have a button to return to menuprincipal

the first time the program does well all this circuit. but when I try the new. it all go well until the program get the form. it show there are no register. I seems as the value of parameter had been delete. I put in the header the value of this paramente for see it. It show correctly but the SQL is no execute rightly

For parameters use [glo_Pedido] on the target.

At the launch site to prepare the variable:
[glo_Pedido]={Pedido};

I think I did it. I used global variables.

App blank to all app. Grid
sc_redir (G_PedidoLineasTemporal04T,_Pedido=$_Pedido);

app Grid.(G_PedidoLineasTemporal04T)
where pedido03= [_Pedido]
sc_redir(F_T03PedidoCabeceraTemporal2,_PedidoT03=[_Pedido]);

app Form (F_T03PedidoCabeceraTemporal2,)
id03=[_PedidoT03]
sc_redir([retorno],"","_parent");

in the second round the execute sql app form no return values, althoug I see the parameter is correct.

App blank to all app. Grid:

Make Variable [glo_Pedido] = Exit

[glo_Pedido] = $_Pedido;
sc_redir(G_PedidoLineasTemporal04T.php, '', "_self");

app Grid.(G_PedidoLineasTemporal04T)

WHERE pedido03 = [glo_Pedido]


sc_redir(F_T03PedidoCabeceraTemporal2.php, '', "_self");

app Form :F_T03PedidoCabeceraTemporal2:

WHERE id03 = [glo_Pedido]