How to redefine the data parameter in the js file externally?
digg: function(obj, projId, subjId, optId) {
data = {
'answer': JSON.stringify(answer),
'login': 1,
'source': 1,
'g_tk': generateToken(getKey()),
'format': 'script',
'callback': 'parent.AppPlatform.Survey.Digg.ReceiveDiggResult'
}
}
That’s it. The scope of
data
within the function is only valid inside the function, so redefiningdata
outside the function does not affect the operation ofdata
inside the function at all.