Hi Jan,<div><br></div><div>I have wrapped the excellent jquery plugin JQuery Address. The api looks like the following:</div><div><br></div><div><div>html document addLoadScript: (html jQuery address onChangeCallback: </div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>[:event :s |</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>s &lt;&lt; (s jQuery id: #log)</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>append: [:h | html paragraph: event printString]]).</div>
</div><div><br></div><div>This binds a callback to the address change event. You could also use the init for handling the event once, or bind an event handler to the externalpagechanged event as described on <a href="http://www.asual.com/jquery/address/docs/">http://www.asual.com/jquery/address/docs/</a></div>
<div><br></div><div>To bind history support to jquery elements:</div><div><br>html document addLoadScript: (html jQuery expression: &#39;a&#39;) address.</div><div><br></div><div>The event passed to the callback consists of the following fields: value path pathNames parameters queryString <br>
<br></div><div>I plan to release it in the pharo jqwidget-box project, but still a n00b on Pharo and monticello (too difficult compared with cincom), so i have put it into the cincom public repository. </div><div><br></div>
<div>Packages:</div><div>JQWidgetbox-JQAddress  -&gt; core libraries</div><div>JQWidgetBox-JQAddress-Dev -&gt; demo app</div><div><br></div><div>Regards,</div><div><br></div><div>Bart </div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote">2010/9/14 Jan van de Sandt <span dir="ltr">&lt;<a href="mailto:jvdsandt@gmail.com">jvdsandt@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(51, 51, 51)">Hello list,<br clear="all">
<br>I am trying to add support for the <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">jQuery</span> <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">history</span> plugin (<a href="http://github.com/tkyk/jquery-history-plugin" style="color:rgb(51, 51, 51)" target="_blank">http://github.com/tkyk/<span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">jquery</span>-<span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">history</span>-plugin</a>) to Seaside. The API of the plugin looks pretty simple but I don&#39;t know how to integrate it with the Seaside <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">jQuery</span> support.<br>


<br>In the onLoad on ready function you should register a callback function using $.<span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">history</span>.init(callback). This callback function gets called with a url hash value as an argument. This function should get the new content from the server using an AJAX request.<br>


<br><font size="2">For the AJAX links on your page that should be bookmarkable and should support the backbutton you must use the $.<span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">history</span>.load(&#39;#some_anchor&#39;) function.<br>


<br>In Seaside this should look something like:<br><br>    html anchor <br>        onClick: (html <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">jQuery</span> <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">history</span> load: &#39;#link1&#39;);<br>


        with: &#39;Link 1&#39;.<br><br>And the init function can be called as part of the onLoad scripts:<br><br>    html document addLoadScript: <br>        (html <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">jQuery</span> <span style="background-color:rgb(181, 220, 249);color:rgb(34, 34, 34);background-repeat:initial initial">history</span> init: [ :anchor | self updateUsingAnchor: anchor ])<br>


<br>This second fragment is probably totally wrong. The update method needs something to render on. Can anybody push me in the right direction?<br><font color="#888888"><br>Jan.</font></font></span>
<br>_______________________________________________<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" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>