[Zope-CMF] Frames and forms in Zope...
Josef Meile
jmeile@hotmail.com
Fri, 4 Jan 2002 16:42:55 +0100
Actually I'm trying to improve the Chat Tool for Zope. My idea is to
add a list of the online users. From this list can be selected one or
more users as recipients of a message.
I have something like this on a frame called "usersFrame":
Online Users:<br>
<form>
<select name="usersList:list" multiple size="23" onchange =
parent.frames['actionsFrame'].document.actionsForm.recipients.value=this.val
ue>
<option value="All">--- All ---</font></option>
<dtml-in expr="objectValues('Folder')" sort="id">
<option value="<dtml-var id>"><dtml-var id></option>
</dtml-in>
</select>
</form>
Note: the onchange event changes the value of a hidden field, which I
have on another form, whenever I selected a new user. I need to do so
because I want to have a text field on the frame where the user can write
and send a message.
On the other frame, called "actionsFrame", I have this:
<dtml-unless recipients>
<dtml-call "REQUEST.set('recipients',['All'])">
</dtml-unless>
<dtml-var recipients>
<form name="actionsForm">
<input name="recipients" type="hidden">
<input name="actionsFrame.html:method" type="submit" value="show">
</form>
This code is just a test which shows me on the actionsFrame the users
that I have selected. The problem is that it only shows me the first
user that I have previously selected. I tried by changing the name of
the input field for "recipients:list", but then IE shows an error
that says that this object doesn't exist. How can I do to instance a
variable on the "actionsFrame" with the users selected on the
usersFrame?
Thanks in advanced,
Josef.