Forum: Ruby on Rails javascript popup not firing

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
39025a7f572d6fe464e1fe6be399ca3b?d=identicon&s=25 Mike Dershowitz (mdersh53)
on 2007-01-23 20:37
(Received via mailing list)

I'm using a javascript calendar I found on the web, which I'm hoping
will invoke a popup.  For some reason, it almost looks like rails is
squelching it. From my view:

<script language="javascript"
<script language="javascript1.2">
var caldef1 =
  firstday : 0,
  dtype : 'MM/dd/yyyy',
  width : 275,
  windoww : 300,
  windowh : 200,
  border_width : 0,
  border_color : 'White',
  multi : true,
  spr : '\r\n',
  dn_css : 'clsDayName',
  cd_css : 'clsCurrentDay',
  tw_css : 'clsCurrentWeek',
  wd_css : 'clsWorkDay',
  we_css : 'clsWeekEnd',
  wdom_css : 'clsWorkDayOtherMonth',
  weom_css : 'clsWeekEndOtherMonth',
  wdomcw_css : 'clsWorkDayOthMonthCurWeek',
  weomcw_css : 'clsWeekEndOthMonthCurWeek',
  wecd_css : 'clsWeekEndCurDay',
  wecw_css : 'clsWeekEndCurWeek',
  preview_css : 'clsPreview',
  highlight_css : 'clsHighLight',
  headerstyle :
    type : 'buttons',
    css : 'clsDayName',
    imgnextm : '../public/images/forward.jpg',
    imgprevm : '../public/images/back.jpg',
    imgnexty : '../public/images/forward.jpg',
    imgprevy : '../public/images/back.jpg'
  imgapply : '../public/images/apply.gif',
  preview : true,
  monthnames : ['January', 'February', 'March', 'April', 'May', 'June',
    'August', 'September', 'October', 'November', 'December'],
  daynames : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
  txt : ['Previous year', 'Previous month', 'Next month', 'Next year',
var c1 = new CodeThatCalendar(caldef1);
  <P>Month+year scrollers</P>
    <input name="id1" type="textarea"/>
    <input type="button" onClick="c1.popup('id1');" value="..."/>

Since this is pure javascript/html, i can't understand why it's not
popping up.  Is rails squelching it for some reason?  If so, why & how
do I fix it.

If I'm down the wrong path - howabout a good on-page calendar for rails
that will populate a field when a date is clicked on?  I found
calendargrid but didn't have much luck getting it to work.

83ca41657a99b65d99889abe712ba5e2?d=identicon&s=25 Jason Roelofs (Guest)
on 2007-01-23 22:32
(Received via mailing list)
First off, go get Firebug (
invaluable for web, especially javascript, development. It will let you
where the error is if there is one.

From first glance though, make sure you have type="text/javascript" in
<script> tag, that's thrown me a few times. Otherwise, there's probably
javascript compiler error, which Firebug will tell you about.

This topic is locked and can not be replied to.