programming

First page not printing in IE 7

A weird problem was happening on one of my sites where IE 7 could print off a web page, but the first page of printing was blank - the content wasn't pushed off to the second page, the first page was simply empty and the second continued on from where the first would have ended.

The solution is easy when you know how: set up a print-only stylesheet that is for IE 7 only, by using the usual <!-- [if IE 7]> method, then in that stylesheet have

html *{

  float:none !important;

}

 

that's all! Thanks to Robby @ basetwo for tracking this down


drupal with active directory (ldap)

Getting drupal authenticating logins against active directory can be intimidating, at first. I certainly felt that way.

A few hints

  • You will need PHP installed with the ldap extension. Use phpinfo(); to check if it's there. Without that you can't even begin.

Web development languages in use in NZ

Tagged:

Today I ran a poll on the NZWEBDEV email list, and asked members to indicate which server side languages they regularly use in their work.

Results are below but you'll need to click on the image for a legible version.

 

Read more


drupal: inserting flash content (youtube videos) fails to display in IE

One of the drupal web sites I work on had a problem where any youtube video that was posted to the site failed to display on internet explorer. Any other browser worked fine.

The code we were trying to insert was this: Read more


swfupload: file uploading nirvana. almost.

Tagged:

I've been playing around with using swfupload to allow users to upload large amounts of large files on ourspace.

It's pretty hot. Flash 10 compatible (security changes in Flash 10 broke a lot of flash-based file uploaders), progress indicators for each file and an upload queue which the user can add files to while other files upload.

Downers: doesn't work on linux (as far as I can tell, anyway) and uses flash. Minor problems, for most...


asp.net: huge difference between DataView.Table and DataView.ToTable

Both DataView.Table and DataView.ToTable return a DataTable from a DataView. The difference is that .Table gives you the underlying data, with no changes from the dataview's sorting or filtering. ToTable on the other hand, gives you the data in the dataview after filtering and sorting!

This is the sort of thing I've come to expect from PHP; similarly named methods that actually do quite different things, and/or inconsistently named methods which do opposite things.


ruby gotcha: exec command

Tagged:

Surprisingly small amount of documentation on the net about this....

When using the exec command, don't expect any of your ruby code after it to execute! This is because the command you run using exec replaces the currently executing script!

Use the system command instead, or the `` trick


automatic iframe height

Tagged:

I've been forced to use an iframe in an app I'm developing, for long and boring reasons.

One of the perennial problems that iframes presented was that their height needs to be specified upfront, and if the content within turned out to be too long then too bad; a nasty scroll bar would appear in the middle of the screen.

I spent hours googling for javascript hacks to dynamically resize the iframe, but in the end Tim Gummer pointed me to the good stuff. I was up and running in 15 minutes.

Dynamic height


Syndicate content