Hello I made webpage that redirect to my app.
I made function to open market page.
what I think it’s weird is that I made code that after 2second page loaded, it automatically call function that redirect market page. but it won’t
what is really weird is that by pressing button , it trigger same function. but then it redirect to market page.
why not redirect automatically , but I should press button?
<script>
//get parameter로 부터 받은 값
function goto(){
console.log("come to goto");
var market_url = "market://details?id=io.ionic.onofflab.bilim";
// window.open("onofflabapp://onofflab.com","_blank")
window.open(market_url,"_self")
}
setTimeout(()=>{
goto();
},2000)
</script>
<body>
<button id="btn" onclick="javascript:goto();"> go to app</button>
</body>
1 post - 1 participant