AJAX 登録フォームがあります。
var id = null;
$.ajax({
type: 'POST',
url: requestUrl,
data: $(".defaultRequest").serialize(),
dataType: 'json',
success: function(data) {
if(data.response){
$('div.errormsg').remove();
if(data.step){
openStep(data.step);
}else{
openStep('next');
}
}else{
$('div.errormsg').remove();
$('<div class="errormsg">'+data.message+"</div>").insertBefore(form);
}
}
});
ユーザーが登録に成功したら、彼に一意の ID を表示したいのですが、NULL のままです。どうすれば解決できますか?
<script type="text/javascript">
$('#linkkk').text('Your id is: '+id+'');
</script>