[Seaside] Re: I would like to attach an onClick event according to
Boris Popov, DeepCove Labs
boris at deepcovelabs.com
Fri Feb 4 23:26:55 UTC 2011
Whats wrong with my examples then? Also, you want it run on load not when you click some button, right?
Sent from my iPhone
On 2011-02-04, at 6:19 PM, "Fritz Schenk" <intrader.intrader at gmail.com> wrote:
> 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
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list