Hi,<br>I tried to implement what you hinted at. I had edited just one line of controlsJs. I got rid of the extra set of brackets in <span style="font-weight: bold;"><span style="font-weight: bold;"><br><br></span>this.mouseoutListener
= this.form.submit(); </span><br><br>Event.observe is done as it was earlier done. I have cropped only that part for your reference.<br><br><br>this.onclickListener = this.enterEditMode.bindAsEventListener(this);<br>
this.mouseoverListener = this.enterHover.bindAsEventListener(this);<br> <span style="color: rgb(255, 0, 0);">//this.mouseoutListener = this.leaveHover.bindAsEventListener(this);Commented(not used)</span><br> Event.observe
(this.element, ''click'', this.onclickListener);<br> Event.observe(this.element, ''mouseover'', this.mouseoverListener);<br> Event.observe(this.element, ''mouseout'',
this.mouseoutListener);<br>...................<br>....................<br>....................<br> createForm: function() {<br> this.form = document.createElement("form");<br> <a href="http://this.form.id">
this.form.id</a> = this.options.formId;<br> Element.addClassName(this.form, this.options.formClassName)<br> <span style="font-weight: bold; color: rgb(255, 0, 0);">this.mouseoutListener = this.form.submit; // Added this Line
</span><br><br> this.form.onsubmit = this.onSubmit.bind(this);<br><br> this.createEditField();<br> if (this.options.textarea) {<br> var br = document.createElement("br");<br> this.form.appendChild
(br);<br> }<br> <br> if (this.options.textBeforeControls)<br> this.form.appendChild(document.createTextNode(this.options.textBeforeControls));<br><br> if (this.options.okButton) {<br> var okButton =
document.createElement("input");<br> okButton.type = "submit";<br> okButton.value = this.options.okText;<br> okButton.className = ''editor_ok_button'';<br> this.form.appendChild
(okButton);<br> }<br> <br> if (this.options.okLink) {<br> var okLink = document.createElement("a");<br> okLink.href = "#";<br> okLink.appendChild(document.createTextNode(this.options.okText
));<br> okLink.onclick = this.onSubmit.bind(this);<br> okLink.className = ''editor_ok_link'';<br> this.form.appendChild(okLink);<br> }<br> <br> if (this.options.textBetweenControls &&
<br> (this.options.okLink || this.options.okButton) && <br> (this.options.cancelLink || this.options.cancelButton))<br> this.form.appendChild(document.createTextNode(this.options.textBetweenControls
));<br> <br> if (this.options.cancelButton) {<br> var cancelButton = document.createElement("input");<br> cancelButton.type = "submit";<br> cancelButton.value = this.options.cancelText
;<br> cancelButton.onclick = this.onclickCancel.bind(this);<br> cancelButton.className = ''editor_cancel_button'';<br> this.form.appendChild(cancelButton);<br> }<br><br> if (this.options.cancelLink
) {<br> var cancelLink = document.createElement("a");<br> cancelLink.href = "#";<br> cancelLink.appendChild(document.createTextNode(this.options.cancelText));<br> cancelLink.onclick
= this.onclickCancel.bind(this);<br> cancelLink.className = ''editor_cancel editor_cancel_link''; <br> this.form.appendChild(cancelLink);<br> }<br> <br> if (this.options.textAfterControls
)<br> this.form.appendChild(document.createTextNode(this.options.textAfterControls));<br> },<br><br>*******************<br>*******************<br>*******************<br><br>Throughout controlsJs, I have made only two changes as indicated above. It is still not updating when I move out of the form. Am I going wrong anywhere.
<br><br>In your first mail, you had mentioned to achieve this using normal WAInput tag. How can this be achieved ?<br><br>Say I have the following form<br><br>html form:[html textinput value: self model title;<br>callback:[:value|self model title: value]]
<br><br>Where do I add onMouseOut method in the above form. Should my form have an id so that onMouseOut, the form is submitted ??<br><br>Thanks again in advance,<br>Rajeev<br><br><br><br><br><div><span class="gmail_quote">
On 9/3/07, <b class="gmail_sendername">Lukas Renggli</b> <<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> this.mouseoutListener = this.form.submit(); // Added this Line<br><br>There are two problems here:<br><br>1. this.form.submit() assigns the result of evaluating the method<br>submit. I assume you would like to assign the function (without
<br>brakets):<br><br> this.mouseoutListener = this.form.submit;<br><br>2. The line above won't assign an event handler. For now you just<br>defined the alias this.mouseoutListener for this.form.submit. Check<br>out the Prototype document to see how to register for DOM events:
<br><br> <a href="http://www.prototypejs.org/api/event/observe">http://www.prototypejs.org/api/event/observe</a><br><br>> I have a sortable(Scriptaculous) with each listItem being an InplaceEditor.<br>> Just in case, to avoid any problem due to coupling, I removed the sortList
<br>> code and tried on a simple orderedList, yet no Progress for me.<br><br>Yes, this is usually a good strategy.<br><br>> Please help me out if the changes I have made are inappropriate. I also went<br>> through wiki at Scriptaculou for Inplace.., couldn't find anything of use to
<br>> me.<br><br>In my first mail I was not talking about SUInPlaceEditor, but just<br>about using a plain textInput as it generated by WAInputTag.<br><br>> If at all it is not possible for submission using onMouseOut event, how
<br>> about having a mechanism to trigger the submit, when we click on anywhere<br>> else on Canvas or any button/link/form other the edit form we are working<br>> on.<br><br>Sure, form submission is possible from any kind of event.
<br><br>Lukas<br><br>--<br>Lukas Renggli<br><a href="http://www.lukas-renggli.ch">http://www.lukas-renggli.ch</a><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">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></blockquote></div><br><br clear="all">
<br>-- <br>Rajeev Lochan<br><br>Co-founder, AR-CAD.com<br><br><a href="http://www.ar-cad.com">http://www.ar-cad.com</a><br>+91 9243468076 (Bangalore)<br>080 65355873