Setting flash notice via javascript?

I am using a javascript to redirect to another action. Is there a way
to set the flash [:notice] in the javascript?

So when the javascript redirects, the new action/view picks up the

(I suspect I may have to do something like url?notice=.....)



I don't think there is a way but you can use a parameter like
and then in the receiving action do[:notice] = params[:notice] if params[:notice]

Andrew Timberlake

"I have never let my schooling interfere with my education" - Mark Twain

@Chris: I think you mis-understood me. I am redirecting to another URL
- not to set flash. I would like to keep the context of flash notices
that was set - so the redirected url picks it up.

@ Andrew: thanks - its a similar approach I was thinking of. Thought
there may be a less 'clunky' way.

What’s the purpose of the flash notice being transferred/available to the other pages?