Modal Box Plugin for Grails
Posted by Prabhu Beeman on July 6, 2008
I tried to implement the Modal Box Plugin in my application and had difficulties in getting it done.The instruction given in the above site looked straight forward. But then after following the instruction all I get is a blank page..
looked into the generated html (right click and view source)
following was the header snippet (<modalbox:modalIncludes/> generates the following code)
<script type=’text/javascript’ src=’/myapp/plugins/modalbox-0.1/js/modalbox/prototype.js’ />
<script type=’text/javascript’ src=’/myapp/plugins/modalbox-0.1/js/modalbox/scriptaculous.js?load=effects’ />
<script type=’text/javascript’ src=’/myapp/plugins/modalbox-0.1/js/modalbox/modalbox.js’ />
<link rel=’stylesheet’ href=’/myapp/plugins/modalbox-0.1/css/modalbox.css’ />
Effectively removing the <modalbox:modalIncludes/> from the jsp gsp renders the page correctly
So time to scrutinize the above 4 lines..
The problem was actually with the empty close tag.
So ideally
<script type=’text/javascript’ src=’/myapp/plugins/modalbox-0.1/js/modalbox/prototype.js’ />
should be
<script type=’text/javascript’ src=’/myapp/plugins/modalbox-0.1/js/modalbox/prototype.js’ ></script>
and so is the rest.
bingo.. everything works great now.
So how do i make this change in the plugin?
Go to your plugins directory -> modalbox-0.1->grails-app->taglib->ModalboxTaglib
then make your changes inside def modalIncludes
Its done…I’m a happy soul now

Alexander Koehn said
Hey guys,
yesterday I updated my modalbox-plugin to version 0.3.
In this version I fixed the version (includes) and the cript-tags are now ending correctly.
Cheers,
Alexander Köhn