<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I'm no Scriptaculous (however you spell that) user, but here's an example utilizing jQuery:<br><br>html image<br>&nbsp;&nbsp;&nbsp; id: 'macd';<br>&nbsp;&nbsp;&nbsp; src: 'http://www.seaside.st/styles/logo-plain.png'.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; html break.<br><br>&nbsp;&nbsp;&nbsp; html anchor<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onClick: (html jQuery ajax script: [:script | script add: (<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (script jQuery: #macd) attributeAt: 'src' put: 'http://www.lukas-renggli.ch/files/4d/y6mlhntkxm44gwm09o7ufxh7tlij4u/diff.png'<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; with: 'Replace it'.<br><br>Here's some pointers:<br><br>a) The image path you have is invalid.<br>b) The 'url' attribute is actually 'src', and will be rendered that way (check your page source with Firebug or something).<br>c) You cannot create an object ie. "(html image id: 'macd'; url: 'http://etrade.com/IBM.macd.gif')" and render it this way.<br>d) I called an ajax script, which isn't necessary unless you want to use a variable for changing the image. The following works fine for a static url:<br><br>"onClick: ((html jQuery: #macd) attributeAt: 'src' put: 'http://www.lukas-renggli.ch/files/4d/y6mlhntkxm44gwm09o7ufxh7tlij4u/diff.png');"<br><br>I hope this helps, someone else please elaborate on this... I'm certainly no expert :)<br><br>RS<br><br>Thanks for the random image Lukas :p<br><br>&gt; To: seaside@lists.squeakfoundation.org<br>&gt; From: squeakman@gmail.com<br>&gt; Date: Tue, 29 Sep 2009 17:57:40 -0400<br>&gt; Subject: [Seaside] replacing DOM elements using AJAX (Scriptaculous)<br>&gt; <br>&gt; Greetings,<br>&gt; <br>&gt; I am attempting to replace one gif file with another using AJAX.  When I <br>&gt; click on the label 'Replace it' what I want is to replace the original <br>&gt; gif with a new gif.<br>&gt; <br>&gt; I suspect that I am using SUElement&gt;&gt;replace: incorrectly.<br>&gt; <br>&gt; Can you tell me what I am doing wrong?  I appreciate any help.<br>&gt; <br>&gt; Thanks,<br>&gt; Frank<br>&gt; <br>&gt; --------- code snippet follows ------<br>&gt; <br>&gt; renderContentOn: html<br>&gt; <br>&gt;         "original gif file - for WSM"<br>&gt;         html image id: 'macd';<br>&gt;         url: 'http://etrade.com/WSM.macd.gif'.<br>&gt;                 <br>&gt;         html break.<br>&gt;         html anchor<br>&gt;                 onClick: (html evaluator<br>&gt;                     callback: [:script |<br>&gt;                     script element id: 'macd';<br>&gt;                                                 <br>&gt;                     "the replacement gif - for IBM"<br>&gt;                     replace: (html image id: 'macd';<br>&gt;                     url: 'http://etrade.com/IBM.macd.gif')]);<br>&gt;                 with: 'Replace it'<br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; seaside mailing list<br>&gt; seaside@lists.squeakfoundation.org<br>&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>                                               <br /><hr />Bing™  brings you maps, menus, and reviews organized in one place. <a href='http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1' target='_new'>Try it now.</a></body>
</html>