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

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Fri Feb 4 19:55:02 UTC 2011

Have a look at JSStream for a way to include literal JavaScript. Having
said all that, in any serious project where you write custom JavaScript,
you're going to want to have a file served from your library that
includes all of your code and you can use vim/emacs/whatever to edit it
to your liking.


-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Fritz
Sent: Friday, February 04, 2011 2:49 PM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] Re: I would like to attach an onClick event according

Thank you Boris

Most informative of other ways to do things.

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

The problem I find is that Seaside incorrectly translates 

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

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

seaside mailing list
seaside at lists.squeakfoundation.org

More information about the seaside mailing list