I want to load in a local page , only the elements LOGIN , PASSWORD , REGISTER , another external page in another domain, without loading the entire layout of it , only these three elements.
I've tried that way , seeking to identify the element:
$.ajax({
url: 'http://www.sptrans.com.br/sac/solicitacoes.aspx',
type: 'GET',
success: function(res) {
var headline = $(res.responseText).find('vUSRLOGA');
$("#conteudo").html(headline);
}
});
and
$.ajax({
url: 'http://www.sptrans.com.br/sac/solicitacoes.aspx',
type: 'GET',
success: function(res) {
var headline = $(res.responseText).text();
$("#conteudo").html(headline);
}
})
I want the elements normally be presented in order to give login or register .
the current way , behind only the text of the page and not the functional elements
Full Code:
<!DOCTYPE HTML>
<html lang="pt-br">
<head>
<!-- Scripts Javascript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="http://projetos.lucaspeperaio.com.br/ajax-cross-domain/jquery.xdomainajax.js"></script>
<script type="text/javascript">
/*$.ajax({
url: 'http://www.sptrans.com.br/sac/solicitacoes.aspx',
type: 'GET',
success: function(res) {
var headline = $(res.responseText).text();
$("#conteudo").html(headline);
}
});*/
$.ajax({
url: 'http://www.sptrans.com.br/sac/solicitacoes.aspx',
type: 'GET',
success: function(res) {
var headline = $(res.responseText).find('vUSRLOGA');
$("#conteudo").html(headline);
}
});
</script>
<title>Teste</title>
<body>
<div id="conteudo" style="background:#EEF0A6"></div>
</body>
</html>
I want to show ONLY the part that is inside the red square: