I am using applicationcraft.com and have the following test app http://acft.ws/tyjk
I have managed to stop the click firing and opening a new window. I need to capture the url of the clicked link. I can then use this to open in an Iframe or childBrowser in a mobile app.
All the alerts are my guesses at what the syntax should be from my web searches. The first answer is here Capturing .click for URLs.
function noopHandler(evt) {
//alert($(this).attr("href") + "/");
//alert(app.w('label').base().attr("href") + "/");
//alert(app.w('label').base()[0].attr("href") + "/");
//alert($(this).find("a").attr('href'));
//alert(app.OBJ2JSON(app.w('label').base()));
//alert(app.OBJ2JSON(app.w('label').base()[0]));
evt.stopPropagation();
evt.preventDefault();
}
function handler_application_onAppStarted(){
var labelToCheck = app.w('label').base()[0];
labelToCheck.addEventListener('click', noopHandler, false);
}
MrWarby