[Seaside] Re: I would like to attach an onClick event according to
Fritz Schenk
intrader.intrader at gmail.com
Fri Feb 4 23:19:41 UTC 2011
I agree that your are failing to see the problem. I have the most efficient way
to to what I want given by the JavaScript:
<most direct way to do this>
$('#external_links a').click(function() {
return confirm('You are going to visit: ' + this.href);
});
</most direct way to do this>
And I can't do it in Seaside without having to take care of special requirements
about strings in the click method (onClick)
<the direct way does not work>
html button
onClick: ((html jQuery expression: '#external_links a') onClick: 'return
confirm("You are going to visit: "+ this.href)');
with: 'Attach Click'.
</the direct way does not work>
If does not work because the onClick message enclosed the whole argument in
double quotes, sand the converts single quotes to double quotes (incorrectly)
with the
<resulting incorrect javascript>
<button onclick="$("#external_links a").click(function(){return confirm("You are
going to visit: "+ this.href)})" type="submit" class="submit">Attach
Click</button>
</resulting incorrect javascript)
So think about it and write it in Seaside in a short, concise, and 'say it in
Seaside' mode.
<I have tried>
html button
onClick: ((html jQuery expression: selector)
onClick: 'return confirm("You are going to
visit: "+ this.href)');
with: 'Attach Click'
</I have tried>
with select set to 'external_links a', but with the same bad result (nested
double quotes).
Thanks
More information about the seaside
mailing list