Hi,
I have a "sign in" button on a view and when a user clicks on it, I want it to run a javascript method. It seems simple and I have a sample one page app which works. However my actual app is several pages and for some reason the same html doesn't work when I copy it from the sample page to the real app. I'm currently trying 3 ways to call the javascript method, but i think the first one is the right way.
<a data-role="button" data-click="signInButton">Sign In</a>
<a data-role="button" href="javascript:signInButton();">Sign In 2</a>
<a data-role="button" onclick="signInButton()">Sign In 3</a>
And the javascript is currently very simple, just popup and alert so I know the method got called and navigate to another view.
function signInButton(e) {
alert('signInButton');
app.navigate("#phoneMain");
}
Here is the current app http://jsfiddle.net/jwhitmer/vsPye/
A few other forum posts helps me get this far. It runs on iPhone, iPad, Android phone and Blackberry phone. I'm amazed at what Kendo UI can do with so little coding on my part.
Thank you for any guidance,
Jason
I have a "sign in" button on a view and when a user clicks on it, I want it to run a javascript method. It seems simple and I have a sample one page app which works. However my actual app is several pages and for some reason the same html doesn't work when I copy it from the sample page to the real app. I'm currently trying 3 ways to call the javascript method, but i think the first one is the right way.
<a data-role="button" data-click="signInButton">Sign In</a>
<a data-role="button" href="javascript:signInButton();">Sign In 2</a>
<a data-role="button" onclick="signInButton()">Sign In 3</a>
And the javascript is currently very simple, just popup and alert so I know the method got called and navigate to another view.
function signInButton(e) {
alert('signInButton');
app.navigate("#phoneMain");
}
Here is the current app http://jsfiddle.net/jwhitmer/vsPye/
A few other forum posts helps me get this far. It runs on iPhone, iPad, Android phone and Blackberry phone. I'm amazed at what Kendo UI can do with so little coding on my part.
Thank you for any guidance,
Jason