私は光沢のある作業をしてきましたが、それはとても良いことだと思いますが、アクション ボタン機能を使用するときに問題があります。問題は、応答の情報を入れるコンテナーを非表示にすると、アクション ボタンが機能しないことです。
例えば。
index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example Tabs</title>
<script src ="shared/jquery.js"></script>
<script src ="shared/shiny.js"></script>
<script src ="actionbutton.js"></script>
</head>
<body>
<form class="span12 menu-med-upload">
<div class="row-fluid">
<button id="uploadFasta" type="button" class="btn action-button shiny-bound-input" >go!</button>
<button id="show">Show</button>
<button id="hide">Hide</button>
</div>
</form>
<div id="table" class="shiny-html-output">asdasd</div>
<script>
$("#table").hide();
$("#show").on("click",function(){
$("#table").show();
});
</script>
</body>
</html>
サーバー.R
library(shiny)
shinyServer(function(input, output) {
output$table <- renderText({
if(input$uploadFasta == 0)
return(NULL)
return("Clicked!")
})
})
行 $("#table"). hide(); にコメントすると 問題なく動作しますが、非表示の場合、コンテナは機能しません。
全てに感謝。