[Seaside] Re: I would like to attach an onClick event according to

Fritz Schenk intrader.intrader at gmail.com
Fri Feb 4 19:48:32 UTC 2011


Thank you Boris

Most informative of other ways to do things.

In my case, I want to translate
<code>
$('#external_links a').click(function() {
    return confirm('You are going to visit: ' + this.href);
});
</code>

The problem I find is that Seaside incorrectly translates 

<code>
html button
onClick: ((html jQuery expression: '#external_links a') onClick: 'return 
confirm("You are going to visit: "+ this.href)');
with: 'Attach Click'.
</code>

It has trouble with quotes as it translates the above into:
<bad code>
<button onclick="$("#external_links a").click(function(){return confirm("You are 
going to visit: "+ this.href)})" type="submit" class="submit">Attach 
Click</button>
</bad code>
As you see the quotes, they are incorrect. How do I correct this?

Thanks again



More information about the seaside mailing list