I'm working with Samsung Gear 2 - trying to dynamically construct a popup in Javascript and open it using tau.openPopup(). However, I can't get the popup to open. Here is my code:
nobutton = document.createElement("a"); nobutton.className = "ui-btn ui-btn-main ui-color-red ui-multiline ui-inline"; nobutton.href = "#1btnPopup" nobutton.setAttribute("data-rel", "popup"); nobutton.addEventListener('click', function(){ var testpopup = document.createElement("div"); testpopup.id = "1btnPopup"; testpopup.className = "ui-popup"; tau.openPopup(document.getElementById("#1btnPopup")); tau.openPopup(document.getElementById("1btnPopup")); tau.openPopup(testpopup); });
I have tried each of the last 3 statements individually and none of them works - the button just doesn't react. I have all the proper JavaScript and CSS files in place, such as tau.css. I've looked at this topic
http://developer.samsung.com/forum/board/thread/view.do?boardName=SDK&messageId=265647&startId=zzzzz~&searchType=ALL&searchText=open+popup
but it didn't help me. Any suggestions as to what could be messing this up appreciated.
Thanks