I have the following Xbasic dialog box:
What I have done above creates the dialog box pictured here below.
What I would like to do is dynamically change the dates and weights ( bg.xValues[0] - bf.xValues[9] )with values in a table. I know how to create an array with the dates and weights I want, I just don't know how to change the xbasic so that the data gets into the script for each different patient.
Thanks in advance.
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED varC_result as C
DIM vc_graph as p
DIM vc_graph.html as c
DIM vc_graph.css as c
DIM vc_graph.linkedFiles as c
DIM vc_graph.events as c
vc_name = "Andre the Giant"
vc_graph.html = <<%html%
<a5:bindings>
</a5:bindings>
<a5:propertyExpressions>
</a5:propertyExpressions>
<html>
<head>
<script language="JavaScript" src="c:\alpha_data\Graph.js"></script>
</head>
<body style="font-family: Arial;">
<table align="center">
<tr>
<td width="5%"></td>
<td id="here" align="center"></td>
<td valign="top" width="5%"></td>
</tr>
</table>
</body>
</html>
<script language="JavaScript">
var bg = new Graph(9);
var name = "Andre the Giant";
bg.parent = document.getElementById('here');
bg.title = name;
bg.xCaption = 'dates';
bg.yCaption = 'Weight<br>(lbs.)';
bg.xValues[0] = [210,'1/14/09'];
bg.xValues[1] = [195,'1/28/09'];
bg.xValues[2] = [170,'2/4/09'];
bg.xValues[3] = [175,'2/11/09'];
bg.xValues[4] = [182,'2/18/09'];
bg.xValues[5] = [186,'2/25/09'];
bg.xValues[6] = [189,'3/4/09'];
bg.xValues[7] = [195,'3/11/09'];
bg.xValues[8] = [193,'3/18/09'];
//bg.xValues[9] = [193,'3/25/09'];
bg.showLine = true;
bg.showBar = false;
bg.draw();
</script>
%html%
vc_graph.css = <<%css%
%css%
vc_graph.linkedFiles = <<%str%
%str%
vc_graph.events = <<%code%
%code%
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Alpha Five",<<%dlg%
{region}
| {HTMLForm=150,40vc_graph};
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
DIM SHARED varC_result as C
DIM vc_graph as p
DIM vc_graph.html as c
DIM vc_graph.css as c
DIM vc_graph.linkedFiles as c
DIM vc_graph.events as c
vc_name = "Andre the Giant"
vc_graph.html = <<%html%
<a5:bindings>
</a5:bindings>
<a5:propertyExpressions>
</a5:propertyExpressions>
<html>
<head>
<script language="JavaScript" src="c:\alpha_data\Graph.js"></script>
</head>
<body style="font-family: Arial;">
<table align="center">
<tr>
<td width="5%"></td>
<td id="here" align="center"></td>
<td valign="top" width="5%"></td>
</tr>
</table>
</body>
</html>
<script language="JavaScript">
var bg = new Graph(9);
var name = "Andre the Giant";
bg.parent = document.getElementById('here');
bg.title = name;
bg.xCaption = 'dates';
bg.yCaption = 'Weight<br>(lbs.)';
bg.xValues[0] = [210,'1/14/09'];
bg.xValues[1] = [195,'1/28/09'];
bg.xValues[2] = [170,'2/4/09'];
bg.xValues[3] = [175,'2/11/09'];
bg.xValues[4] = [182,'2/18/09'];
bg.xValues[5] = [186,'2/25/09'];
bg.xValues[6] = [189,'3/4/09'];
bg.xValues[7] = [195,'3/11/09'];
bg.xValues[8] = [193,'3/18/09'];
//bg.xValues[9] = [193,'3/25/09'];
bg.showLine = true;
bg.showBar = false;
bg.draw();
</script>
%html%
vc_graph.css = <<%css%
%css%
vc_graph.linkedFiles = <<%str%
%str%
vc_graph.events = <<%code%
%code%
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Alpha Five",<<%dlg%
{region}
| {HTMLForm=150,40vc_graph};
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
What I would like to do is dynamically change the dates and weights ( bg.xValues[0] - bf.xValues[9] )with values in a table. I know how to create an array with the dates and weights I want, I just don't know how to change the xbasic so that the data gets into the script for each different patient.
Thanks in advance.
Comment