# How to display a Model Box as Rails response

**URL:** <https://www.ruby-forum.com/t/how-to-display-a-model-box-as-rails-response/193535>\
**Category:** Rails\
**Created:** [August 19, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/how-to-display-a-model-box-as-rails-response/193535 "2010-08-19T12:05:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luckydev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb8c5e/32.png) [@luckydev](https://www.ruby-forum.com/u/luckydev)\
**Post date:** [August 19, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/how-to-display-a-model-box-as-rails-response/193535/1 "2010-08-19T12:05:55Z")

</div>

I am using jquery colorbox plugin as my popup/modal dialog box solution  
in my site. When I give a js response to client, I want to open a popup  
modal dialog box as the response. I wrote the following code in my  
response1.js.erb just to test the creation of popup box

$.colorbox();

I am getting the Javascript response correctly from server but while it  
is getting executed on the browser, firebug reports error like

$.colorbox() is not a function

how else can I do the task? please help. All my related  
javascripts(jquery,colorbox) are getting loaded properly when the page  
loads (i checked the page source html file)
