OAFC_Rob Posted November 27, 2013 Share Posted November 27, 2013 I have a javaScript object that is set when data is retrieved from a SQLite DB and then when a button is linked the value is to be updated to the value stored in the button tag. But this isn't updating anyone have any ideas? It's been driving me crazy!! //HERE is the line that is suppose to update it. // When it is initially set the value of _idwork.priorityID = 3 and it shoudl be updating// to 1 the current value of key but isn't _idwork.priorityID = key; console.log(idwork); Quote Link to comment https://forums.phpfreaks.com/topic/284320-js-object-not-updating/ Share on other sites More sharing options...
Irate Posted November 27, 2013 Share Posted November 27, 2013 Try console.log(_idwork), identifiers are unique and case-sensitive in JavaScript. Quote Link to comment https://forums.phpfreaks.com/topic/284320-js-object-not-updating/#findComment-1460318 Share on other sites More sharing options...
OAFC_Rob Posted November 27, 2013 Author Share Posted November 27, 2013 Sorry a typo being putting in the code on here, the console.log is correct and _idwork Quote Link to comment https://forums.phpfreaks.com/topic/284320-js-object-not-updating/#findComment-1460319 Share on other sites More sharing options...
Solution OAFC_Rob Posted November 27, 2013 Author Solution Share Posted November 27, 2013 Resolved!!! The problem was when I was retrieving the data from the DB I was just returning the row data straight out and not assigning it to an fresh object. It seems that there are issues if you do it that way. Quote Link to comment https://forums.phpfreaks.com/topic/284320-js-object-not-updating/#findComment-1460327 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.