-4
I have a small doubt in a project I’m developing.
The following happens:
I have this input on a page (index php.):
<input id="exibe" value="Aqui vai ficar o texto **que foi** copiado">
On the other page, I have this element (wow.php):
<font id="pegar" class="campo">Aqui fica o texto **que vai ser** copiado</font>
What I need is that when the person accesses the index php. who owns the
input
withid="exibe"
, thatinput
will have hisvalue=""
filled in with the text on the other page (wow.php) that is inside the<font>
withid="pegar"
.
It is possible to do this?
It will be the text that is inside the
<font>
, in the case of "Here is the text that will be copied" :)– Alexandre Lopes
It is already generated. It is a page already made. What I want is to remove this doubt that I have been trying to find out for years. Kkkkkkkkk :)
– Alexandre Lopes
Your question is how to get HTML text?
– Bacco
Simmm :D Exactly!!!
– Alexandre Lopes
Already answered on the site then: http://answall.com/questions/78621/70
– Bacco
But it has to be set to input value="".
– Alexandre Lopes
It pulls a text that is on another page, and plays that text within the value of the
input
, on the home page.– Alexandre Lopes
Exact, question with several different subjects ends up being too wide. And both already have answer on the site, just give a little search. Anyway, the tricky part is what I pointed out in the link above. the rest is just one
echo
in thevalue
, that solves (do not forget to escape the special characters).– Bacco
Something so simple? Look at the size of the question!
– Alexandre Lopes
Thank you very much @Bacco was just what I wanted!!! I just made it work here :)
– Alexandre Lopes
only do not forget about htmlentities() in value echo, otherwise you may have problems with special characters.
– Bacco