Alert

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Alert

Jeff Gray
How do I add formatting to alerts in Seaside?
I wrote a method that validates 3 values and then builds up a text message with all errors.
At the moment the 3 messages appear one after the other. I want to see them each on their own line.

crlf message doesn't work.
Adding <br/> doesn't work.

Do I need to render a page for this?
Reply | Threaded
Open this post in threaded view
|

Re: Alert

Diogenes Moreira
Actually, you dont need re render the entery page. You can use ajax to inform the errors. See the jquery examples

Best regards
------Mensaje original------
De: Jeff Gray
Remitente: [hidden email]
Para: [hidden email]
Responder a: Seaside - general discussion
Asunto: [Seaside] Alert
Enviado: 11 Nov, 2010 00:04


How do I add formatting to alerts in Seaside?
I wrote a method that validates 3 values and then builds up a text message
with all errors.
At the moment the 3 messages appear one after the other. I want to see them
each on their own line.

crlf message doesn't work.
Adding <br/> doesn't work.

Do I need to render a page for this?
--
View this message in context: http://forum.world.st/Alert-tp3037197p3037197.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Enviado desde mi BlackBerry® de Claro Argentina
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Alert

Ramon Leon-5
In reply to this post by Jeff Gray
On 11/10/2010 08:04 PM, Jeff Gray wrote:
>
> How do I add formatting to alerts in Seaside?

The same way you do in other frameworks, with client side JavaScript,
thus not a Seaside issue.

alert("like\nthis")

--
Ramon Leon
http://onsmalltalk.com
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Alert

Jeff Gray
Are you saying all my validation should be done client side?
Reply | Threaded
Open this post in threaded view
|

Re: Alert

Robert Sirois
It doesn't have to be, but it's much faster client-side.

I, personally, tend to send the information to the server via ajax, and then it decides whether to reload the page with whatever is next, or send some javascript back, say, highlighting the invalid fields red and saying "Hey, you can't do that." or what have you.

RS

> Date: Thu, 11 Nov 2010 18:12:22 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: [Seaside] Re: Alert
>
>
> Are you saying all my validation should be done client side?
> --
> View this message in context: http://forum.world.st/Alert-tp3037197p3038968.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Alert

John McKeon
In reply to this post by Jeff Gray
I believe he said, if you want formatting in javascript, use javascript formatting. For new lines insert "\n", the *javascript* newline.
The string argument to the alert() function is going to be interpreted by a javascript engine. It doesn't understand html.
John


On Thu, Nov 11, 2010 at 9:12 PM, Jeff Gray <[hidden email]> wrote:

Are you saying all my validation should be done client side?
--
View this message in context: http://forum.world.st/Alert-tp3037197p3038968.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
http://john-mckeon.us

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside