0
I’m still struggling in Jquery, before that I’m bringing a value of Mysql database:
<div id="cod_<?php echo $jmValor->IdCodUsuarios; ?>">Nome do usuário</div>
But I need to do type what happens with the PHP explode(), IE, remove the Cod_ and leave only the value coming from the bank. So I did so:
var id = valor.split('cod_');
var valor = document.getElementById(id);
$(".conteudoChat").load("chat/?convidar=s&Key="+valor);
What I need is to take the value from the database, put the value in the div.
Thank you!
Hello Hélder. Thank you for the answer, but I still have a question. How would I get the value of div, since it is dynamic and put within the value variable?
– user24136
@Jose.Marcos through an event
onchange
in the element.– Renan Gomes
I made a change to my post, which I think can solve your problem. However if you call the function in the onchange of the div as said @Renan should also work.
– Hélder
Thank you all for your help. It worked!
– user24136