ログイン後にユーザーを a.html からb.html
ページにリダイレクトしています。Select Images
ページに「disabled
」属性のファイル選択ボタン「 」がありますがb.html
、これは FB ログイン後にのみ有効にしたいと考えています。以下は、このための私のコードです。
function fblogin(){
FB.login(function(response) {
if (response.status == 'connected') {
login();
} else {
//window.location.reload();
}
}, {scope:'email,publish_stream'});
return false;
}
function login() {
window.location = "b.html";
document.getElementById('uploadbtn').removeAttribute('disabled');
document.getElementById("genPNG").attr('disabled','enabled');
document.getElementById("genJPG").removeAttribute('disabled');
}
上記のコードではうまくいかないので、
document.getElementById('uploadbtn').removeAttribute('disabled');
document.getElementById("genPNG").attr('disabled','enabled');
document.getElementById("genJPG").removeAttribute('disabled');
ページにb.html
。どうすれば思い通りに動作させることができますか?どんな助けでも大歓迎です。前もって感謝します。