Can we have multiple HTML files in Phonegap application?
Yes, you can. Here's an example from their git repo:
http://github.com/phonegap/phonegap-iphone/blob/master/PhoneGapTutorial/www/index.html
<a href="geolocation.html">
<div class="item">
<h2>GeoLocation</h2>
</div>
</a>
Definitely. Just link to it from your html (anchor tag), and the html file should be in your www folder. Don't forget to add "phonegap.js" in a script tag like your index.html file if you want to access Phonegap functions.
Related
I have dynamic web project which I have made using Eclipse IDE and working correctly on tomcat. But when I uploaded the project on Github its servlets are not loading however HTML files are working fine.
So my question is how to run those servlets on Github?
<a target="_top" href="showDriveClass"><input type="button" value="Show Drives" id="bt1" title="This will show current drives in your Sytem"/></a>
<a target="_top" href="DetailPdClass"><input type="button" value="Details" id="bt3" title="Details of Your Drives"/></a>
<a target="_top" href="CompareDriveClass"><input type="button" value="Compare" id="bt2" title="Compare all drives of your system"/></a>
<input type="button" value="About" id="bt4" title="About Web Drive Detector"/>
<input type="button" value="help" id="bt5" title="Help Contents"/>
In this html pages are loading but first 3 servlets are not.
This is not something Github does. It will render certain kinds of files in your repository for easier viewing, but it is not an application container.
I wish to set up a facebook share gate to access my files in my website. when the user shares my website on their facebook acct, they can download the file. otherwise, no. This question is pretty similar to the post below. I tried the demo provided by adam with the downloaded file link inserted to the code. But it failed. It just show the file without popping out the usual facebook share dialogue in my website. However, if i tried the demo there, it did pop out the share dialogue together with the file even before i share. Am I missing something in the code? as i just copy the code in the demo to my website. Thank you.
Is it possible to add a link to download a file that can only be downloaded by sharing it on Facebook?
`
<div>
<p>This file is locked, to unlock and download it, share it</p>
<p class="hidden">Thanks for sharing, the file is unlocked and ready for download</p>
<p class="hidden">In order to download this file, you need to share it</p>
</div>
<a class="fsl fsl-facebook" href="#" id="facebook-share">
<span class="fa-facebook fa-icons fa-lg"></span>
<span class="sc-label">Share on Facebook</span>
</a>
<a class="fsl content-download" href="http://img3.wikia.nocookie.net/__cb20140510200316/spiritanimals/images/0/05/Tiger.jpg" id="download-file">
<span class="fa-download fa-icons fa-lg"></span>
<span class="sc-label">Download File</span>
</a>
`
adam's demo code
I am having lots of problems while coming up with a solution.
I have a website that share text or image greetings( text greeting only at this time) on facebook or twitter etc. I planed to use Addthis.
So I created a function like this
<%
Function DisplayShareDiv(surl, sT, sSummary)
%>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style"
addthis:url="<%=surl%>"
addthis:title="<%=sT %>"
id="addthis_container"
addthis:Description="<%=sSummary%>">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_google_plusone"></a>
<a class="addthis_button_email"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">var addthis_config = { "data_track_addressbar": true };</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=###################3"></script>
<!-- AddThis Button END -->
<%
end function
%>
Now problem is that title appears when click on facebook or twitter but url doesn't. I also want to add the description to it. I have og tags too but they need to be dynamic too and i am having problems with fb not picking up that info either. Even though i have run it through debugger. I am at it for 2 days and it is now all a mish mash. I would really appreciate if someone can please help me!!
Now I'm getting this. Is that as you require?
I think facebook was picking up an old version of your page.
The text it picked up were from the OG and description meta tags on your home page.
If you run your page through their debugging tool, that forces it to scrape the latest version of your page. Plus you might get some useful info too. https://developers.facebook.com/tools/debug/
I want to embed a variable amount of text files (AngularJs templates) at a specific point of a given text file (./WEB-INF/app.html) but except modifying the file saving it as another file (./index.html?.
The files I want to embed all have file names ending with *.ng.html and are all in a subfolder of ./assets/templates/.
Also I want to write text before and after the embed file (To make AngularJS recognise that they are templates). This text should consist of both static text and the file names relative to the working directory.
This is a possible structure of a working directory:
(index.html) (generated after building)
--assets
--templates
--general
about.ng.html
contact.ng.html
home.ng.html
--users
userlist.ng.html
--WEB-INF
app.html
Can this be done using Ant? If not, how could I do this at build-time in Eclipse?
To further illustrate my intentions, here are examples:
./WEB-INF/app.html
<!doctype html>
<html><head>
#INSERTION_POINT#
</head><body></body></html>
./assets/templates/general/about.ng.html
This is a test.
./assets/templates/general/contact.ng.html
You can contact me at: <a href=mailto:mail#example.com>mail#example.com</a>
./assets/templates/general/home.ng.html
Welcome.<br>
Click a link to explore.
./assets/templates/users/userlist.ng.html
<ol>
<%= "{{#userlist}}" %>
<li>
{{username}}
</li> <%= "{{/userlist}}" %>
</ol>
After building, I want ./index.html to look like:
<!doctype html>
<html><head>
<script type="text/ng-template" id="/assets/templates/general/about.ng.html">
This is a test.
</script>
<script type="text/ng-template" id="/assets/templates/general/contact.ng.html">
You can contact me at: <a href=mailto:mail#example.com>mail#example.com</a>
</script>
<script type="text/ng-template" id="/assets/templates/general/home.ng.html">
Welcome.<br>
Click a link to explore.
</script>
<script type="text/ng-template" id="/assets/templates/users/userlist.ng.html">
<ol>
<%= "{{#userlist}}" %>
<li>
{{username}}
</li> <%= "{{/userlist}}" %>
</ol>
</script>
</head><body></body></html>
I figured out that I can get a list of the files I want to embed using:
<fileset dir="war/assets/templates">
<include name="**/*.ng.html"/>
</fileset>
When I have the final string, I could replace my placeholder and save the output to a new file probably like this:
<copy file="WEB-INF/app.html" tofile="index.html">
<filterset>
<filter token="INSERTION_POINT" value="??foo??"/>
</filterset>
</copy>
But how do I get the string I want to have to pass as a value?
definitely not what you're looking for... sorry... but might look into a Javascript oriented build tool (Grunt) and integrate that with eclipse (or even run it from ant if you're trying to keep your builds the same in java and javascript.)
Though this may not be exactly what you're looking for, you're guaranteed lots of community support if you stick to the standards.
Hi and thanks for the help,
I am trying to add a button on my company's intranet site, but dang if there aren't 1000 jsp files obscuring my effort.
How do I find out which file contains a specific UI element?.
Here is what FireBug shows me:
<div class="TabContent TitleTabContainer">
<a class="TabTitle" role="tab" onclick="return !1;"href="javascript:void(null);" title="Documents" style="width: auto;">Documents</a>
</div>
Thank you,
WH