Link to home
Start Free TrialLog in
Avatar of ltpitt
ltpitt

asked on

jQuery Mobile events and variables

Hi all!

I have almost finished the 1st part of my 1st web app...

I have serious problem with understanding how to handle JQM events and variables that should work for the entire page.

My app is here:

http://pitto.homeip.net/mobile

The problem is that when I select any customer in the 1st page I land on a detail page where I can add payments simply tapping on the month name.

Insert (or delete) in the database happens perfectly but my page refresh function doesn't work properly because I "lose" my variables from one function to the other.

I've tried using global variables like $.myVariables.variable without luck.

Something is wrong also probably with my events...

I do everything for the details page in the pagebeforeshow because if I use the pageinit it stops working.

Can someone provide specific help or, if not possible, also generic info? I am pulling my hair from days.
Avatar of Roopesh Reddy
Roopesh Reddy
Flag of India image

Hi,

Is this a single page application? If not, JavaScript variables will be lost. I also suggest you to check Knockout - http://knockoutjs.com/

Hope it helps u...
ASKER CERTIFIED SOLUTION
Avatar of ltpitt
ltpitt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ltpitt
ltpitt

ASKER

Nobody else provided correct information