<html><head><base href="x-msg://89/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'd use a js function installed in the (wrapper div of the) element that corresponds to the component. And that function will make a request that can run a normal seaside callback.<div><br></div><div>I use prototype so a function to change the state of the component (i.e: closing it) it would look like:</div><div><br></div><div><br></div><div><div><div>AnOpennableClosable&gt;&gt;beClosedFunctionOn: html&nbsp;</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>^ JSFunction new</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>add: (html prototype request</div><div><span class="Apple-tab-span" style="white-space: pre; ">                                </span>callback: [self beClosed ];</div><div><span class="Apple-tab-span" style="white-space: pre; ">                                </span>yourself);</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>yourself</div></div><div><br></div><div>But you want a value so you can use the request's callback:value: like this:</div><div><br></div><div><div>AnOpennableClosable&gt;&gt;beClosedFunctionOn: html&nbsp;</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>^ JSFunction new</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>add: (html prototype request</div><div><span class="Apple-tab-span" style="white-space: pre; ">                                callback: </span>[:val| someState := val]<span class="Apple-tab-span" style="white-space: pre; "> value: </span>'navigate.to().whereverTheValue[is]' asJSObject;</div><div><span class="Apple-tab-span" style="white-space: pre; ">                                </span>callback: [self beClosed ];</div><div></div><div><span class="Apple-tab-span" style="white-space: pre; ">                                </span>yourself);</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>yourself</div><div><br></div></div><div>BTW, observing some custom event and make it react with that, is something that usually rocks</div><div><br></div><div>have fun</div><div><br></div><div><a href="http://twitter.com/sebastianconcpt">sebastian</a></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><div>On Oct 25, 2010, at 6:14 PM, Thomas McCune wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#ffffff"><div><font size="2" face="Arial">I am calling a Seaside component from JavaScript with one parameter. Does</font></div><div><font size="2" face="Arial">anyone know how to fetch the parameters in a component? Based upon</font></div><div><font size="2" face="Arial">some documentation on the net I have tried the following without success:</font></div><div><font size="2" face="Arial"></font>&nbsp;</div><div><font size="2" face="Arial">time:=self session fieldsAt: #time.</font></div><div><font size="2" face="Arial"></font>&nbsp;</div><div><font size="2" face="Arial">Thanks.</font></div>_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></div></blockquote></div><br></div></div></body></html>