On Nov 9, 8:47 am, Lars Stavholm <st...@telcotec.se> wrote: > Hi All, > > I'm looking to implement collapsible fields in a django powered > page, so far with no luck. > > Any hints on the best way of doing it? > > In the mean time, I checked out how it's done in the admin interface, > and came up with a simple test page as follows: > > <html> > <head> > <link rel="stylesheet" type="text/css" > href="http://localhost:8000/media/css/forms.css" /> > <script type="text/javascript" > src="http://localhost:8000/media/js/core.js"> > </script> > <script type="text/javascript" > src="http://localhost:8000/media/js/admin/CollapsedFieldsets.js"> > </script> > </head> > <body> > <fieldset class="collapse"> > <h2>Job Details</h2> > <div class="form-row jdate"> > <div> > <label for="" class="required">Jdate:</label> > <input name="jdate" value="2009-11-10" > class="vTextField" maxlength="30" > type="text" id="id_jdate" /> > </div> > </div> > </fieldset> > </body> > </html> > > But for some reason, it does not work. The collapsed > field shows up (I guess) by ways of the <h2>Job Details</h2> > showing up, but nothing else. > > Any hints? > > I admit, I'm a newbie at these things, but still. > > Any advice appreciated. > > R > /Lars
None of the admin scripts will work without the 'jsi18n' script, which is actually accessed via an admin view. Include this line before the other scripts: <script type="text/javascript" src="http://localhost:8000/admin/ jsi18n/"></script> and it should work. Firebug is great for debugging this sort of thing - it would have told you 'gettext is not defined' which would have helped track down the problem. -- DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---