Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

Navigate to other page with JS

Hello,

I have two pages.
I want to redirect to both. I am using a button clicking event with javascript code.

My codes are true! I added the last of row. (button2)

Apperyio.navigateTo("page2",{});

If I looking mobile preiview, button2 clicking forever loading bar turns :)
So my page is happening timeout.

How to solve this?

Thank you for interest.

Peter LPunkt
Posts: 0
Joined: Mon Jan 13, 2014 3:07 pm

Navigate to other page with JS

Look at errors in console -- if you dont have, install Chrome Dev Tools

try codeApperyio.navigateTo("page2");/code

if you want a transition: code Apperyio.navigateTo('page2', {
transition: 'slideup'
});/code

Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

Navigate to other page with JS

I look. Thank you. I am using Firefox.

And, I choiced window storage, (because I can't use localStorage), error is;

"window is not defined"

Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

Navigate to other page with JS

I need a global variable.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Navigate to other page with JS

Fatih,

Unfortunately this is a pure JS, and it is outside of the scope of our support. You should search for the solution online. For example here: http://stackoverflow.com/questions/57...

Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

Navigate to other page with JS

Already, I am using "window" but It showed me up error. I don't solve it :S

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Navigate to other page with JS

Fatih,

Could you please detail what error do you get?

Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

Navigate to other page with JS

Firefox console, "window is not defined".

We are defining in function. But We want defining to function out for global variable. Apperyio this disallow.

How I can do it?

My work is public. Editor can change.

Thank you again.

---------------- EDIT

I added new javascript file from "create new", I will guess this like it happening. (depo.js)

var __ygs = {};
var __lys = {};
var __net = {};

And, I added this storages from about of the page, this like;

__ygs['Blabla'] = var1;
__ygs['Blabla2'] = 321;

This time no error, They aren't keep to data.

Apperyio("test1").text(__ygs["Blabla"]);

Result is NaN.

---------------- LASTLY

I found it http://devcenter.appery.io/tutorials/...

and try, this result is same NaN

Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

Navigate to other page with JS

Firefox console, "window is not defined".

We are defining in function. But We want defining to function out for global variable. Apperyio this disallow.

ADD 1

I added new javascript file from "create new", I will guess this like it happening. (depo.js)

var __ygs = {};
var __lys = {};
var __net = {};

And, I added this storages from about of the page, this like;

__ygs['Blabla'] = var1;
__ygs['Blabla2'] = 321;

This time no error, They aren't keep to data.

And after try like apperyio type; (result is same still !)

localStorage.setItem('Blabla',var1);

Apperyio("test1").text(__ygs["Blabla"]);

Result is NaN.

ADD 2

I found it http://devcenter.appery.io/tutorials/...

and try, this result is same NaN.

ADD 3

I clear all this, I create a new LocaleStorage type of Number from Model and Storage. It is name is "ygs1" and My value sent page clicking button with "run javascript" event. Write this code (after my transactions );

localStorage.setItem('ygs1',YGS1);

And Page orientation with button clicking. I added Set Property from this page, I selected my localStorage variable. So "ygs1"

Second, Load event add "run javascript" code;

Apperyio('test1').text(localStorage.getItem('ygs1'));

Result is NaN.

I don't understand ! Almost I tried everthing since yesterday.

---------------------

My project is public, so editor can change ! (I have a one project)

Thank you for interest.
I am waiting for you feedback !

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Navigate to other page with JS

Replied here https://getsatisfaction.com/apperyio/...
Also, you can always check whether there are errors in console.

Return to “Issues”