Showing Javascript variable from html box in label

This forum contains topics that were moved from Get Satisfaction
David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

Showing Javascript variable from html box in label

Post by David wyatt »

Hi,

Thank you for your help. I've shared with you, it's called xappy.
When it loads the label score_label should show the variable from page show event (2 at present)
The button nav to gameover should load gamover page. And in game over page the button should launch an alert showing variable from input box.
like I said feels like none of the JavaScript to appery commands are working.
Thanks again

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

Showing Javascript variable from html box in label

Post by Evgene Karachevtsev »

David,

You connected your jquery library and it breaks the application, since the app already includes jquery library newer version by default. If you need an earlier version, please select it at the app settings - external resources and remove yours.
Also the code
preApperyio('score_label').text('window.score'); /pre
inserts into label not variable window.score, but the string "window.score". To work correctly please remove the quotation marks, like this:
preApperyio('score_label').text( window.score );/pre

David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

Showing Javascript variable from html box in label

Post by David wyatt »

Thank you,

its working now. Appery team always give great support, thank you team

Post Reply