Good Morning Mike http://www.prototypejs.org/api/ajax/updater
could you illustrate how the prototype JS function works in struts? are you using a <struts>plugin? how would struts identify and create the 'items' container for 1st parameter illustrated here: new Ajax.Updater('items', '/items', { parameters: { text: $F('text') } }); when script elements are in response and evalScripts=true evalScripts false This determines whether <script> elements in the response text are evaluated or not.where are the script functions located that would be eval'ed can prototype return json formatted response? apologies for long-winded response, Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: list-subscripti...@secmgmt.com > To: user@struts.apache.org > Subject: RE: Help with JSP and javascript > Date: Tue, 14 Jul 2009 09:33:23 -0400 > > For the record, here's what works. > > <s:submit type="image" alt="Unlocked" src="%{unlocked_image}" > onclick="%{'$(\\'' + #form_name + '\\').request(); setTimeout(new > Ajax.Updater(\\'' + #door_url + '\\', \\'' + #foo +'\\', {evalScripts: > true}), 1000000); return false;'}"/> > > Thanks for the help. > > Mike. > > -----Original Message----- > From: Wes Wannemacher [mailto:w...@wantii.com] > Sent: Friday, July 10, 2009 3:03 PM > To: Struts Users Mailing List > Subject: Re: Help with JSP and javascript > > There is a way to escape quotes in OGNL... I thought I had a sample sitting > around somewhere but I am not finding it. Check google. I would guess that > you > could just escape the single quotes you need and the rest will fall into > place. > > -Wes > > On Friday 10 July 2009 14:54:30 Security Management wrote: > > OK, thanks Wes, I'm making progress: > > > > This: > > > > <s:submit type="image" alt="Unlocked" src="%{unlocked_image}" > > onclick="%{'$(' + #foo + ').request(); return false;'}"/> > > > > > > Generates: > > > > <input type="image" alt="Submit" src="/smc-appsuite/pages/door-control > > /images/unlocked.png" id="door3_0" value="Submit" > > onclick="$(door3).request(); return false > > ;" alt="Unlocked"/> > > > > If I use single-quotes inside, I get errors. Double quotes as well. > > Escaped double quotes give me ", but what I really need is: > > > > onclick="$('door3').request(); return false;" > > > > Note the single quotes around 'door3', which is what #foo is. > > > > > > -----Original Message----- > > From: Wes Wannemacher [mailto:w...@wantii.com] > > Sent: Friday, July 10, 2009 12:09 PM > > To: Struts Users Mailing List > > Subject: Re: Help with JSP and javascript > > > > On Friday 10 July 2009 11:49:04 Security Management wrote: > > > Can someone suggest a way to do this: > > > > > > <s:submit type="image" alt="Unlocked" src="%{unlocked_image}" > > > onclick='$("<s:property value="#foo"/>").request(); return false;'/> > > > > > > I have tried a bunch of ways, but always wind up with the > > > <s:property... in the resulting HTML, rather than > '$("form1").submit()' > > > like I need. > > > > > > Thanks > > > > Try this - > > > > <s:submit type="image" alt="Unlocked" src="%{unlocked_image}" > > onclick="%{'$(' + #foo + ').request(); return false;}'}"/> > > -- > Wes Wannemacher > Author - Struts 2 In Practice > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more > http://www.manning.com/wannemacher > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009