Reputation: 830
I'm new to HTML/Javascript/Jquery, so this question may seem basic. But I've found a filebrowser online that I want to use in my app in Phonegap. The thing is, the example I've downloaded uses this method to open the filebrowser.
<a href="fileBrowser.html" data-role="button" data-inline="true" id="browseBtn">Browse</a>
But I need to use the Javascript to open it, because I only want it when I longpress the button. But neither of these methods work:
window.location.href = ("fileBrowser.html");
window.open("fileBrowser.html");
Which I call like this (just to test if it works):
<a onclick="test()" data-role="button" data-inline="true" id="browseBtn">Browse</a>
It is supposed to come out like this:
But unfortunately, it comes out as this, when I use Javascript:
Upvotes: 0
Views: 178
Reputation: 1043
Looks like you use jQuery Mobile?
Use this:
$.mobile.changePage("fileBrowser.html");
Upvotes: 1