Hello,
I tried to give two URL strings to a dialog window and get these back
there into variables. In the code I can write whatever I want but it
doesn't give me one of the variables back. First I have suggested
that
I have to encode the url with encodeURI, encodeURIComponent or escape
before I call the dialog window, but it doesn't change anything. If
somebody can help me with this I am really satisfied. My Code is:
In the parent page:
[..]
Method changeColumns() [ Language = javascript ]
{
var table = zenPage.getComponentById('table');
var tableColumns = table.getProperty('columns');
var columns = "";
var marked = "off";
var headers = "";
for(i=1; i<tableColumns.length-1; i++){
headers += tableColumns[i].getProperty('header')+'|';
}
headers += tableColumns[i].getProperty('header');
for(i=1; i<tableColumns.length-1; i++){
marked = tableColumns[i].getProperty('hidden') ?
'off' : 'on';
//columns += tableColumns[i].getProperty('colName')
+'='+marked
+'|';
columns += marked+'|';
}
marked = tableColumns[i].getProperty('hidden') ? 'off' :
'on';
//columns += tableColumns[i].getProperty('colName')
+'='+marked;
columns += marked;
var adresse = 'de.logisticus.user.gui.ColumnDialog.cls?
headers='+headers+'&columns='+columns
// This alert still shows me the right values!
// alert('adresse='+adresse);
zenLaunchPopupWindow(zenLink(adresse),'showHideColumns','status,scrollbars,
resizable,width=700,height=550');
}
[..]
In the dialog page:
[..]
/// Contents of the dialog body.
XData dialogBody [ XMLNamespace = "
http://www.intersystems.com/zen" ]
{
<pane id="dialogBody" xmlns="
http://www.intersystems.com/zen">
<vgroup id="displayColumnGroup">
</vgroup>
</pane>
}
Method %OnAfterCreatePage() As %Status
{
Set group = %page.%GetComponentById("displayColumnGroup")
Set headers = %page.headers
Set ^pk($ZH) = headers
Set columns = %page.columns
Set ^pk($ZH) = columns
Set x = 1
While ($PIECE(headers, "|", x) '= "") {
Set header = $PIECE(headers, "|", x)
//Set ^pk($ZH)="header="_header
Set marked = $PIECE(columns, "|", x)
//Set ^pk($ZH)="marked="_marked
Set checkbox = ##class(%ZEN.Component.checkbox).
%New()
Set
checkbox.id = "wahl"_x
Set checkbox.caption = header
Set checkbox.value = marked
Do group.%AddChild(checkbox)
Set x = $INCREMENT(x)
}
Set buttonOk=%page.%GetComponentById("btnOK")
Set buttonOk.caption = "OK"
Set buttonCancel=%page.%GetComponentById("btnCancel")
Set buttonCancel.caption = "Abbrechen"
Quit $$$OK
}
[..]