[Seaside] Re: I would like to attach an onClick event according to
Fritz Schenk
intrader.intrader at gmail.com
Sun Feb 6 19:35:24 UTC 2011
John, thank you for taking the time to recreate the test. It teaches me how to
use Seaside more efficiently. Except for the <break>s it is exactly the
http://jsbin.com/imuka5/2
However, neither
<myAttach> html button
onClick: ((html jQuery expression: '#external_links a')
onClick: 'return confirm("You are going to visit: "+ this.href)');
with: 'Fritz''s Attach Click'.
/myAttach>
or,
<yourAttach> html button
onClick: ( (html jQuery expression: '#external_links a')
call: 'click' with: ('return confirm("You are going to visit: " + this.href)'
asFunction));
with: 'My Attach Click'
<yourAttach>
Work. What the small application incorrectly brings up the inspector in the
callback of the anchor without output of the confirm dialog.
The reason being that the above two attaches are translated into code with
the same problem. The embedded double quotes are the problem.
<as per source in halos>
<button onclick="$("#external_links a").click(function(){return confirm
("You are going to visit: "+ this.href)})" type="submit" class="submit">
Fritz's Attach Click</button>
<button onclick="$("#external_links a").click(function(){return confirm
("You are going to visit: " + this.href)})" type="submit" class="submit">
My Attach Click</button>
<as per source in halos>
Notice that the onClick:... and call:... messages generate exactly the same code.
I have reported this problem.
More information about the seaside
mailing list