0
I would like to apply an effect that works as follows, a search in the form that when displayed the result on the page should automatically scroll in place of the div where the search result will be.
Note: Could someone show me an example of how to do this??
This is code from the part that displays the results, how to deploy this javascript function in this code:
if ($resultados->num_rows > 0) {
while($linha = mysqli_fetch_array($resultados)) {
echo utf8_encode("<strong>Nome: </strong>" ."<strong>". $linha['nome']."</strong>" . "</br>");
print ("<strong>Endereço: </strong>" . $linha['endereco'] . "</br>");
if (isset($_POST['cidade']) && $_POST['cidade'] === 'sao-gabriel-da-palha') {
$fromPerson = 'São Gabriel da Palha';
echo "<strong>Cidade: </strong>" . $fromPerson . "</br>";
}
print ("<strong>Telefone: </strong>" . $linha['telefone'] . "</br>");
echo "<strong>email: </strong>" . $linha['email'] . "</br>";
if (isset($_POST['palavra'])) { // remover acentos
$palavra = preg_replace("/&([a-z])[a-z]+;/i", "$1", htmlentities(strtolower(trim($_POST['palavra']))));
}
if (!empty($palavra) &&
in_array($palavra, array('andrey ferraz', 'andrey', 'ferraz', 'andrey martins ferraz'))){
require 'andreyferraz.php';
}
} }else{
echo "<h3 align='center'>Empresa ainda não cadastrada!</h3>";
Really, your question is very wide, in HTML there is the "autofocus" , maybe it helps.
– M. Bertolazo
interesting, didn’t know, I’ll take a look at it... thank you very much
– WPfan