ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Trouble getting Update Rest Service to work

Katya,

How do I make the default text in my Popup the value of the date or notes field that was clicked to initiate the Popup? I tried the more properties then put attribute as "defaultvalue" and "Value" as the variable containing that data.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Trouble getting Update Rest Service to work

You can store the value in local storage and then read the value in popup.

As for More Properties -- every element will have different available properties. Search jQuery Mobile and HTML elements docs to see what's supported.

ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Trouble getting Update Rest Service to work

How do you "readthe value in popup"? (syntax wise)

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Trouble getting Update Rest Service to work

You can use standard local storage API. You will find an example here: http://docs.appery.io/tutorials/build...

And here: https://developer.mozilla.org/en-US/d...

ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Trouble getting Update Rest Service to work

Max - 1st of all thanks. Using the local storage API is working great. However, I have one problem. Once I edit the value in my pop up and press the 'ok' button, I need to get the new value stored back in the original component, but that component is contained on the screen that the pop up was called from and therefore not visible from the pop up screen. What is the best way to update that component not contained on the current page?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Trouble getting Update Rest Service to work

Access the component in the DOM and update its value.

ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Trouble getting Update Rest Service to work

Max - when I use the following code to put the value from my edited text area (on the pop up "edit date") back into the label on the page the pop up is called from - the alert I'm using to see if the edited value was stored is blank. Is this an Appery problem? (see below)

var eDTA = Appery('editDateTextArea').text();
alert(eDTA);
Appery('gameDateLabel').text().val(eDTA);

The value is not being stored and the variable would appear to be blank.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Trouble getting Update Rest Service to work

"gameDateLabel" -- input or output component?

ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Trouble getting Update Rest Service to work

It's a label component attached to a database field.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Trouble getting Update Rest Service to work

Hi Steven,

Please try the following code:
codevar eDTA = Appery('editDateTextArea').val();
alert(eDTA);
Appery('gameDateLabel').text(eDTA);/code

Return to “Issues”