0
well, I have this scenario... my index.html calls another page (home.html) and there are two variables in the index that I want to take home to make my decisions...
index code.
$("a[data-type]").on('click',function(){
var _nome = $(this).attr('id')
_tipo = $(this).attr('data-type')
dados = {"nome": _nome, "tipo": _tipo};
$.ajax({
type: 'GET',
url: 'home.html',
data : dados,
success:function(data){
$('#conteudo').html(data);
}
});
})
how I can get the name and type properties there at home?
Do you want to get these values via Javascript? Because if it is, I believe it is not possible, because the page
home.html
will not be loaded in the browser and thus the JS of this file does not run.– Woss
I’m actually imbuing this page inside a div in my index
– Bruno Dias