This topic is locked

href='#' doesn't work

4/5/2023 9:37:36 AM
PHPRunner General questions
C
carlos.oschi@gmail.com author

Hi everyone, i am using phprunner 10.91, this version seems to encapsulate the href="#" link to the root of the site.
¿the session control model does anything related to this?
var popup = Runner.displayPopup( { url: "./documentos_add.php", width: 1050, height: 530, header: "Nuevo Documento", footer: '."'".'<a href="#" class="btn btn-default" onclick="window.win.close();return false;">Cerrar</a>'."',".' afterCreate: function(popup) {window.popup = popup;}, beforeClose: function(popup) { tabla = $("#tabla_documentos").DataTable(); tabla.ajax.reload() } });but when you click the button close created in footer the link redirects to the root of the site an refresh all menu.php option.
img alt
i make a test link on the page to do the same href and the result is identical, redirect to root /# directory y no the current page #
img alt
¿can have some help on this?
this is strange, because the regular "X" in corner works good.
thanks!!!

Sergey Kornilov admin 4/5/2023

This is not the right way to point to a root of the website. Use the following:
<a href="/" ...

C
carlos.oschi@gmail.com author 4/5/2023

i am not pointing to root my friend, i only click the close button as indications of manual
https://xlinesoft.com/phprunner/docs/how_to_display_any_page_in_a_popup.htm
example 7
this button only need to "close" the form, but this redirect to root ( menu.php ) and close the form, the idea is refresh the ajax used in combination of datatables.

C
carlos.oschi@gmail.com author 4/6/2023

this is a phprunner behaviour, y perform a simple test over on test server whith this code
file login2.php
<?php
echo '<a href="#">test</a>';
?>
and the result was expected testsite.vm/login2.php#
please tellme if exist a workarround for this, on php9.8 this trouble doesn't exist.

C
carlos.oschi@gmail.com author 4/6/2023

well, i found but this is not a recomended way to solution,
i remove in the headers.htm file the line point to <base> statement.
the main problem is i do not know if this can affect the overall application.
to this moment all works perfect... but...