Hi, in the simple JS code:
alert('message');
I get the name.html of the page for the caption. How can i assign the caption in the JS?
Hi,
It should be something like this:
precode
Appery('mobileheader1').text('message');
/code/pre
im kinda confused. I dont want 'mobileheader_name' as my caption. I want to write my own caption other than the name of the page. The line you gave me does the same thing as before. Please give me a better example.
Hi!
I have the same problem, and I dont think this will help.
When we try to present the App on IPad i.e. for Apple reviewer we want to convince them that this is a real app. When we use Alert("Welcome to my app") we get the name of the page + .html in the dialogue.
Alert gives us the name of the html page in the title. This looks very bad on the screen ![]()
Hi,
Create a special popup, which pulls out of localStorage Title and Message. Next, in JavaScript assets describe function my_alert (title, message) that records these variables in localStorage and calls popup. On popup place needed buttons (such as OK) that will close popup (maybe more).
With some effort, the very serious functionality can be implemented on such popup basis, not only alert, but also smart dialogue with Yes / No / Cancel / etc.
Ok. Thanks Katya!
Appery support is superior. Always leading us in the right directions ![]()
Introduce my_alert js function:
Create a popup screen and name it popup1 with two components mobileheader1 and mobilelabel_3
On a button on the main form run this JavaScript:
my_alert('My Title','Hello and welcome to my App. This is a very very very long long text');
In Your JavaScript asset add this to new or any file
function my_alert(my_title,my_text)
{
localStorage.setItem('my_title', my_title);
localStorage.setItem('my_text', my_text);
Appery.navigateTo('popup1', {});
}
on popup1 Show event Add this JavaScript:
Appery('mobileheader1').text(localStorage.getItem('my_title'));
Appery('mobilelabel_3').text(localStorage.getItem('my_text'));
Please stackoverflow answer
"In Your JavaScript asset add this to new or any file
function my_alert(my_title,my_text)
{
localStorage.setItem('my_title', my_title);
localStorage.setItem('my_text', my_text);
Appery.navigateTo('popup1', {});
} "
Im lost on this part.
Do you have question regarding adding code to JS asset or code itself?
Both, where in the JS asset do I place this, and do I place this in JS asset for the popup? And do I replace all (my_title) to whatever I would like my title to read?