I am doing a laravel project. i want to make web page content load when scrolling. i tried with several types. but not suceed.
Related
I'm building an Ionic application, I have built 50% of the project, and at first I used the sidemenu template that is auto generated with ionic start MyProject sidemenu, and then I added my own pages and components after that.
In the browser view the app was great, then I deployed my application to an android device, with the deployment being successfully When I start the application I felt that the application was slow, but when I switch to a some view, it took 5-10 seconds to open the new page.
I watched the traffic between the server side and the application, and observed that the application is not switching to the new page until the request is back and the view is rendered!
any help?
Try switching to your views first and then using the ionViewWillEnter() or another built in ionic API for the application lifecycle.
ionViewWillEnter will pull the data everytime the view loads, where
ionViewDidLoad will pull the page on first load only.
ionViewDidLoad() {
console.log('ionViewDidLoad SplashPage');
}
You do not state which version of ionic you are using but in ionic 3 if you create your pages with the terminal using
ionic g page MyPage
It will automatically create the page as a module. This allows for lazy loading. You can read more on it here form ionic's official blog post.
Its hard to say exactly why the view is only loading after it hits the server as you have not added your navigational code. There could be a code block that waits for a server response before pushing to the next page.
If your view is depended on received data from the server then your request should be in a new Promise allowing you to add conditionals for before and/or after the data has been touched.
I'm developping a jqm application with spring mobile in the back-end.
Whenever I hit the browser refresh button on my mobile phone the page is completely devastated afterwards. Browsers back-button works properly.
The data are still available due prg pattern (flashAttributes in Spring) after refresh. Only the view is malformed.
Any ideas how to solve this problem?
From jQuery Mobile docs :
The simplest approach when building a jQuery Mobile site is to reference the same set of stylesheets and scripts in the head of every page. If you need to load in specific scripts or styles for a particular page, we recommend binding logic to the pageinit event (details below) to run necessary code when a specific page is created (which can be determined by its id attribute, or a number of other ways). Following this approach will ensure that the code executes if the page is loaded directly or is pulled in and shown via Ajax
So what happens is - in jQuery Mobile, the scripts and styles defined in the head are loaded only once. So, in normal conditions, it works fine, as all the pages will use the scripts loaded from the first page.
But. When you refresh a page in-between, it triggers a page-reload instead of the ajax navigation model thatjqm uses. So all the scripts and styles loaded from the first page will not be included from here on out.
What you need to do is "reference the same set of stylesheets and scripts in the head of every page", so that even if you hit refresh in the middle, the scripts and styles that had been loaded from the head of the first page are loaded again.
I recommend you read the docs from the above link fully to gain a better understanding.
I am creating a website that has a huge number of forms that are called from a dynamically created menu. There may be a number of other pages on the site that are basic HTML layouts. I was thinking to use Wordpress as the controller for my site. That way I do not have to replicate the Wordpress layout features. I would need to do the following:
Have Wordpress get the contents of the menu using AJAX which would
return the descriptions and the links to the pages.
On selection of an option from the menu open the page in an iframe.
Is this even possible and, if so, where would I start?
I'm hoping this isn't a double-post - I couldn't find my issue in the search, but I imagine it might be asked in several ways. My project involves a PHP5 workspace running the Laravel 4 framework.
Quickly, my issue occurs when I access any webpage within my private project that does not first make a call to a database. When viewing the page, my images are missing and the CSS styles - though correctly called in source, and accessible when I click on the HREF's for my styles - aren't displayed properly.
After going to a page that makes a database call (for instance, my Manage Users page which displays a list of users in the database), all images and styles in all pages work. Essentially, I:
Access the homepage, which is static HTML. It's styles are broken.
Access an admin panel page which is static HTML. It's styles are broken.
Access an admin panel page that pulls a list of users to the database. The styles suddenly work.
Any pages I visit after this point display styles properly.
Has this happened to anyone else? Is there a simple way to resolve this?
Use phonegap 1.6,now called cordova 1.6, with jquery mobile 1.0.1,but I feel performance is a problem.
Also with some other js libs,such as iscroll.js, plus the performance problem.
Can I load phonegap js just once,and later all pages can still use phonegap api?
I have an idea that Page A load phonegap js ,and nested iframe refer Page B.
Page B will replace by other pages. Can Pages in iframe use its parent phonegap api?
eg: parent.(all phonegap api)
You can use jQuery Mobile data-role="page" to define multiple pages on a single html page with one phonegap.js load.
See the docs at http://jquerymobile.com/demos/1.1.0/docs/pages/page-anatomy.html