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

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Fri Feb 4 20:14:59 UTC 2011

You may need to remove namespace declaration if you're not on

-----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 3:14 PM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] Re: I would like to attach an onClick event according

Thanks Boris. The code for you provided
<bad code does not compile>
	| onclick |
	onclick := html javascript return: ((Javascript.JSStream new)
						nextPutAll: 'confirm';
						argument: (html jQuery
</bad code does not compile>

To my thinking we should strive to say it Seaside. In this case, Seaside
does handle the desired text correctly when handling

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

<desired result in javascript>
<button onClick="$('#external_links a').click(function() {
    return confirm('You are going to visit: ' + this.href); });"
type="submit" class="submit">Attach Click</button> </desired result in
javascript> and the jsbin: http://jsbin.com/imuka5/2

seaside mailing list
seaside at lists.squeakfoundation.org

More information about the seaside mailing list