I want to display a GLOBAL or SESSION variable value within a javascript popup. Despite the apparent simplicity of this question and much searching and reading, I haven't been able to find an example on the A5 Forum, Alphapedia, or the net in general.
Problem:
The simple javascript command I'm using is:
Thanks to any and all who can provide some insight.
Problem:
- Several "action buttons" have been defined for a grid
- I want to use the button to toggle a value from TRUE to FALSE and back again
- But for DEBUG purposes I also want to temporarily have the button display the variable value in the javascript popup
- While I could use other forms of dialog or an A5W page, I need to understand variable scope between underlying components and "in-line javascript"
The simple javascript command I'm using is:
// ========= // // Popup a message that shows a variable value // // ========= // A5.msgBox.show( '<table width=216 border="1" bgcolor="#ffe187"><tr><td><b>Alert!</b></td></tr></table>' , '<table width=216 border="1" bgcolor="#fff6db"><tr><td><div style=\'padding: 20px;\'>Would like to display a GLOBAL or SESSION variable value here:<br><br>GLOBAL variable <b>var_some_GLOBAL_variable</b> = [show GLOBAL value here]<br><br>SESSION variable <b>var_some_SESSION_variable</b> = [show SESSION value here]<br><div></td></tr></table>' , 'none' , function() {} ) ; |
Javascript popup code: 20130402_A5v11_show_variable_in_javascript-popup_question_01.png |
Result: 20130402_A5v11_show_variable_in_javascript-popup_question_02.png |
Thanks to any and all who can provide some insight.
Comment