Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Bug reports and fixes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Use page loader in Elxis 5.x
« previous
next »
Print
Pages: [
1
]
Author
Topic: Use page loader in Elxis 5.x (Read 3189 times)
datahell
Elxis Team
Hero Member
Posts: 10356
Use page loader in Elxis 5.x
«
on:
May 13, 2019, 22:09:26 »
Let's say you have a javascript function that performs an AJAX task and you want during this process to display a "Please wait" message. You can use
elx5StartPageLoader
and
elx5StopPageLoader
to do so. The elx5StartPageLoader function has an input parameter with which you can define your own page loader. In this example we will use the administration's area default page loader for simplicity.
To begin page loader:
elx5StartPageLoader();
When you script ends (with success or failure it doesnt matter) stop the page loader like this:
elx5StopPageLoader();
That's it! Easy enough?
In case you want to
create your own page loader
. The in PHP type this:
echo $elxis->obj('html')->pageLoader('mypgloader');
where
mypgloader
is the ID of your page loader.
Then in javascript you call it like this:
elx5StartPageLoader('mypgloader');
elx5StopPageLoader('mypgloader');
«
Last Edit: May 17, 2019, 21:19:35 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Use page loader in Elxis 5.x