[Resolvido] find id no return do ajax
Eu tenho a seguinte chamada ajax:
$.ajax({
type: 'post',
url: 'logic.php',
data: {idstyles: idritmo,checked:checked},
datatype:'html',
beforeSend: function(){
},
async:false,
success: function(mensagem){
var content = $( mensagem ).find( '#toppanel' );
alert(content.html());
},
error: function(erro){
}
});
como resposta tenho:
<html><body>
<!-- Panel -->
<div id="toppanel">
<div id="panel">
<div class="content clearfix">
<div class="left">
<h1>Welcome to MusicSyle Production</h1>
<h2>A style/pattern source solution</h2>
<p class="grey">You are free to use this login and registration system in you sites!</p>
</div>
<div class="left">
<h1>Members panel</h1>
<p>You can put member-only data here</p>
<a href="registered.php">View a special member page</a>
<p>- or -</p>
<a href="index.php?logoff">Log off</a>
</div>
<div class="left right">
</div>
</div>
</div> <!-- /login -->
<!-- The tab on top -->
<div class="tab">
<ul class="login">
<li class="left"> </li>
<li>Hello zipzap!</li>
<li class="sep">|</li>
<li id="toggle">
<a id="open" class="open" href="#">Open Panel</a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
<li class="right"> </li>
</ul>
</div> <!-- / top -->
</div> <!--panel -->
<input type="hidden" id="numritmos" value="1" />
<input type="hidden" id="totalprice" value="10" />
</body></html>
porque é que o alert devolve null??
Discussão (4)
Carregando comentários...