onclick関数がクリックされたときに他のオブジェクトを表示したいと思います。そのボタンをクリックすると、1つのオブジェクトが非表示になり、他の2つのオブジェクトが表示されます。すでにstyle.visibilityをvisibleに設定しています。しかし、showtwoオブジェクトは機能しません。
サンプルの更新:
<input type="submit" id="show" name="show" value="show" onclick="RemoveDoc(); document.getElementById('docname').style.visibility='hidden'; document.getElementById('browse').style.visibility='visible'; return false;" />
//browse input
<input type ="file" name="browse" id="browse">
方法2:
//Using my RemoveDoc() function, I want the button of browse being show out.
function RemoveDoc(Doc)
{
xmlhttp1=new XMLHttpRequest();
xmlhttp1.open("GET","functions/remove.php?Doc="+Doc,true);
xmlhttp1.onreadystatechange=function()
{
if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
{
//when i run debugging, it says that the style of null..
document.getElementById("browse").style.visibility='visible';
}
}
xmlhttp1.send();
return false;
}
</script>
どちらも参照ボタンを表示できない2つの方法を試しました。表示されているので、ブラウズオブジェクトに表示されているものを呼び出す必要があります。