0
I would like to know how to load the code from another html or php file using the function $(".div").load("html.html");
The mistake here would be :
It loads the code perfectly, but I have a button in this HTML, the button appears right but then it does not execute anything, if I put the direct button without using the function .load()
, he works right, carrying using the load()
it does not perform the functions.
I thought the load
would do the same include
of php
someone can explain me?
<input class='submit' name='entrar' type='button' value='entrar'>
I also created a file html.php
and inside it I put a echo
with the above code, it returned perfect on the screen but also without performing the function.
php is a server-side interpreted language, meaning I don’t know any way to pull the server source code via client-side code like jQuery. The fact that the button is not working properly may be because some file has not been properly loaded by the load() function. But to be able to help it would be necessary that you post files the code that loads the load and what is loaded by this load.
– Fábio Jânio
Fabio , the only thing that the load carries and this code above only that , would be as an example , to start working on , but the button does not function
– Jonnys J.
The page that is loaded it has internal css and js? You looked if these elements were loaded?
– Fábio Jânio
Confusing question... when you ask a question, think about the person who will read and knows nothing about your system and much less what you intend! Try to put relevant information in an organized way. Do you want to load an HTML containing a button and press it nothing happens? What should the button do? What contains your HTML?
– Filipe Moraes
Ajax not working? Below is a link explaining a little more http://www.linhadecodigo.com.br/artigo/3585/ajax-basico-introducao.aspx
– Fabrício Machado