Generate PDF from html in jQuery mobile application - jquery-mobile

I am new to jQuery mobile and i am working to generate PDF from dynamic HTML through the mobile app, I have already used couple of plugins like HTML2PDF, here I am getting iText issue in HTML2PDF.
Please help me or guide me for the another plugin that support jQuery Mobile.

Related

Issue with multi-page navigation using jQuery Mobile Framework in IBM Worklight [duplicate]

This question already has an answer here:
How to change between pages using Jquery Mobile in Worklight
(1 answer)
Closed 8 years ago.
I am developing a sample mobile banking app in IBM Worklight V6.2 using the jQuery Mobile Framework. I read the Getting Started Documentation on IBM Worklight and it mentions a way to implement multi-page navigation using fragments. However, it also states that if you are using a JavaScript UI Framework, use its API's instead.
I read up on the jQuery Mobile pagecontainer method and am implementing it as below:
<li>Branch Locations</li>
However, I get the issue that the linked page loads after clicking the link but the original page then reloads. Could someone explain to me why this is happening? Is this a known issue?
I found the problem. I had a link to the
<script src="jqueryMobile/jquery.mobile-1.4.3.js"></script>
In the linked pages. That is the reason it was reinitializing the original index page.
See this project for a Worklight 6.2-based app using jQuery Mobile 1.4.3's Pagecontainer widget.
In the app, you click on a button to transition from index.html to page1.html by using:
HTML
load page1
JavaScript
function changeToPage1() {
$(':mobile-pagecontainer').pagecontainer('change','page1.html');
}
You may also take a look at the following questions that are answered with explanation and project examples for using changePage.
Note that the projects may be from Worklight 6.0 and 6.1 rather than 6.2 but that does not matter as here it's about the JavaScript, simply review it.
How to change between pages using Jquery Mobile in Worklight
IBM Workligt Single HTML file containing all application pages: How to load new page?
IBM Worklight 6.1 - Why is Cordova code not working when placed in a sub-page?
IBM Worklight - Page fragmentation
IBM Worklight - Navigation errors in a multipage app
In all of them, the idea is that Worklight is a Single Page Application. Thus you cannot load another HTML file and expect the application to continue functioning. By doing so you lose the "context" of the Worklight framework - the references to the included JS files, etc.
Instead, you can use jQuery's load or jQuery Mobile's changePage (deprecated in v1.4, to be removed in v5), to load different "pages". Ample examples are provided above.

jquery mobile not working with google app script

When I've linked jQuery Mobile in my HTML Frontend in Google App Script, the following error will pop up in chrome debug tool.
Could not create the property 'jQuery110204039543210528791': USELESS is not extensible. 702029031-maestro_htmlapp_bin_maestro_htmlapp.js?lib=MT0FjXL5Y7sJYLE797XdNlumjcy0VxvZE:62
jquery.mobile-1.3.2.min.js:2: Could not create the property 'jQuery110204039543210528791': USELESS is not extensible.
More looks likely the Caja in Google App Script is not supporting jQuery Mobile?
Any idears?
Caja sanitation prevents jQuery mobile markup. This is an issue addressed in the Issue Tracker.
I'm not sure how long it would take to have jQuery added to Caja's list...

Downloadable files using jQuery mobile

I'm fairly new to jquery mobile, and am getting an error when trying to link a file in my jquery mobile project for download. I would like a user to be able to download a .zip file from the app, but get either a page loading error, or undefined displayed in a new page. I tried using an anchor tag to link the file to download, but it doesn't seem to work right. I know jquery mobile makes use of the anchor tag, so I don't know if there is something special that needs to be done. Any help?
You are likely getting the exception when jQuery Mobile assumes the link is a page and attempts an AJAX page load. Disable AJAX loading on the link.
Link
And I have no idea what the typical mobile browser will do with a link to zip file.

Looking for jQuery mobile image slideshow compatible with PhoneGap

I'm looking for a jQuery Mobile image slideshow that is compatible with PhoneGap.
I checked out this one: http://www.photoswipe.com, but there doesn't seem to be an active community around it, e.g. the issues I registered never got answered.
I also had a look at this one: http://tympanus.net/codrops/2010/05/27/awesome-mobile-image-gallery-web-app/
But that makes use of an external XML file, and I don't want to write an XML file for each slideshow that I want to show.
Now, is there a proven image slideshow for jQuery Mobile that is compatible with PhoneGap?
You can go for http://www.photoswipe.com/ which is best one.
People have successfully used it with jQuery Mobile.
also you can Try http://swipejs.com/

Does PhoneGap require JQM or is that a coincidence?

The PhoneGap examples that I'm seeing use jQuery Mobile, but I'm wondering if PhoneGap requires it, or if people are using JQM because they're (obviously) writing a mobile app?
In fact, does PhoneGap require jQuery at all?
Let me Google that for you:
http://wiki.phonegap.com/w/page/16494778/Getting%20Started%20with%20PhoneGap%20(iOS)%20-%20Xcode%203#Requirements
That is for iOS but no PhoneGap does not require jQuery.
People are most likely using jQuery mobile since they are trying to target multiple devices and JQM supports that fairly well out of the box.
http://wiki.phonegap.com/w/page/36868306/UI%20Development%20using%20jQueryMobile
Phonegap does not require jQuery at all.
It's basically just an empty browser window without all the fluff. You can use whatever HTML, CSS, and Javascript tricks you want as long as they're compatible with an HTML5 capable browser.
I like http://zeptojs.com/ for handling the javascript. Much more lightweight (although you lose a lot of the animations and stuff that JQuery has)

Resources