Hi Gurus, I'm learning the Rails framework, and I have this exact
block of html/javascript in two places in an if/else construct in
application.html.erb:

<body onload="Modalbox.show('<div class=\'warning\'> <p> <center> <%=
flash[ :notice ] %> </center> </p> <p> <center> <input type=\'button\'
value=\'OK\' onclick=\'Modalbox.hide()\'/> </center> </p> </div>',
{ title: this.title, width: 300 } );">

Trying to be DRY, I'd like to put that html/javascript somewhere once,
and call it from within application.html.erb.  What's the best place
to put it, and how do I call it from application.html.erb?

TIA,
Craig

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to