2011/8/2 Lukas Renggli <span dir="ltr"><<a href="mailto:renggli@gmail.com" target="_blank">renggli@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This has nothing to do with JQuery and/or Seaside, this is just HTTP,<br>
HTML and JavaScript. The form submission is part of the browser event<br>
handling of the button, but your click handler interfers with this<br>
when you remove the button.<br><div></div></blockquote><div><br>I guess I made some assumptions about how submit works instead. So I hacked this piece of html (wow that felt strange) to see what could work.<br><br><html><head><title>Demo</title></head><br>
<body><br><form name="Person" action="<a href="http://de.selfhtml.org/cgi-bin/formview.pl" target="_blank">http://de.selfhtml.org/cgi-bin/formview.pl</a>"><br><input type="text" id="lastname" size="30"><br>
<input id="save" type="submit" onclick="dosubmit()" value="Save"><br></form><br><script><br>function dosubmit() {<br> var button = document.getElementById("save");<br>
var text = document.createElement("span");<br> text.innerHTML = "Progress";<br> button.parentNode.replaceChild(text, button);<br> document.Person.submit();<br>}<br></script><br></body><br>
<br>This does <u>not</u> work. I guess I can't do a submit once I changed dom structure of the form? So if that's not gonna work it's not gonna work using Seaside either.<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>
> onClick: ((html jQuery id: #submit) value: 'Processing';<br>
> attributeAt: #disabled put: #true);<br>
<br>
</div>Not sure, but I would say that doesn't work either: disabled buttons<br>
typically do not trigger a form submission.<br></blockquote><div><br>Oh, that works. Maybe because the dom structure of the form hasn't changed only some attributes?<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Also, why do you write '#true' instead of 'true'?<br></blockquote><div><br>True. What was I thinking! ;)<br>I have to admit, that I still feel a bit confused about the jQuery, JS, Ajax stuff, so I thought setting some attribute "directly" needs to have a "literal" true.<br>
<br>Alex<br></div></div>