<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<META content="MSHTML 6.00.6000.16525" name=GENERATOR></HEAD>
<BODY class=hmmessage bgColor=#ffffff>
<DIV><FONT face=Arial>Hi</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>do it in two phase.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>first make a plugin that will return the list of values
for the select.</FONT></DIV>
<DIV><FONT face=Arial>but instead of producing html, simply output a string with
the values separated by comma, like this: </FONT></DIV>
<DIV><FONT face=Arial>option1,option2, option3, ... </FONT></DIV>
<DIV><FONT face=Arial>if the option name is different from the option value,
simply generate two string</FONT></DIV>
<DIV><FONT face=Arial>you do this in the renderform function of your plugin, by
setting, for example $optionNamesList = 'option1name,option2name,...' and
$optionValuesList = 'option1value,...'</FONT></DIV>
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>and in your template, add this somewhere:</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial><script type="text/javascript"><BR>
/*<![CDATA[*/<BR> var optionNamesList =
'{$optionNamesList}';</FONT></DIV>
<DIV><FONT face=Arial> var optionValuesList =
'{$optionValuesList}';<BR> /*]]>*/<BR></script></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>this way to can access the options data via the edit
plugin javascript</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>the edit plugin javascript is complex, maybe ask someone
who know javascript to help you with that part</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>In the actual HowToAddDropdownInEditPlugin example, the
options data is written in hard in the code. All you have to do is, instead, get
the optionNamesList and optionValuesList javascript variable (defined in the
template, see above).</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>so, instead of using </FONT></DIV>
<DIV>var authorisedOptionsList = new array( ...</DIV>
<DIV>var authorisedOptionsListLabel = new array( ...</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial>you use</FONT></DIV>
<DIV>var authorisedOptionsList = <FONT
face=Arial>optionValuesList</FONT>.split(",");</DIV>
<DIV>var authorisedOptionsListLabel = <FONT
face=Arial>optionNamesList.split(",");</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>this convert the string provided by your other plugin into
an array of options label and value the javascript from the edit plugin can
use.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>regards</FONT></DIV>
<DIV><FONT face=Arial>Oliver</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>Hey all,<BR>If i want to use the example given in the wiki for retrieving
data from server (<A
href="http://cartoweb.org/cwiki/HowToReturnDataFromServerToClient"
target=_blank>http://cartoweb.org/cwiki/HowToReturnDataFromServerToClient</A>),
but i want to return this data list to the javascript that constructs an edit
table (in edit plugin), how would i do that? I want to combine the above HowTo
and the dropdownlist(<A
href="http://cartoweb.org/cwiki/HowToAddDropdownInEditPlugin">http://cartoweb.org/cwiki/HowToAddDropdownInEditPlugin</A>)
HowTo.<BR>Am not a pro in these things (javascripts, php)<BR>Thanks<BR>Broun
Uganda<BR><BR><BR>
<HR>
Get news, entertainment and everything you care about at Live.com. <A
href="http://www.live.com/getstarted.aspx " target=_new>Check it out!</A>
</DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Cartoweb-users
mailing
list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE></BODY></HTML>