More Questions Than Answers

Dan Atrill's blog site

Show / Hide dynamic layers

It’s possible to assign an id dynamically to a layer and set it to initally display: none
Using the Javascript function below it is possible to toggle the dynamic layer on and off:
function showdiv(div_id) {
if (document.getElementById){
var targetID = document.getElementById(div_id).style.display;
if (targetID == “none”) {
document.getElementById(div_id).style.display = “block”;
} else {
document.getElementById(div_id).style.display = “none”;
}
}
}

more... »

Tue, June 29 2004 » Web developing » Comments Off

PHP Thumbnails

When uploading images and then listing them dynamically, it is possible to create thumbnails on the fly in PHP. This appears at Zend’s Autogallery though doing a Google PHP thumbnail search there are a number of methods.

more... »

Wed, June 16 2004 » PHP » No Comments

Perl debug

From 123-reg’s online support:
Put “use CGI::Carp qw(fatalsToBrowser);” into the second line of your script. This will make perl print the error instead of the “500 Internal Server Error” page, and will allow you to find out where your script is breaking.
Can be used in combination with:
#!/usr/bin/perl -w
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(-debug :standard);
use diagnostics;
And remember to [...]

more... »

Tue, June 15 2004 » Web developing » No Comments

Samba/Squid

Have made a couple of small breakthroughs with both Samba and Squid tonight. Am sharing files on Linux server from Windows XP machine.
First with Squid, getting it started was sorted out by changing the DNS host in Network to be the IP address of the server. This meant the service could be started. Am still [...]

more... »

Fri, June 11 2004 » Linux » 2 Comments