Ivar Johnson

Code Snippets & Other Stuff

This page contains some really old (like web 1.0!) bits of code I use/have used over the years. Maybe somebody else might find something here useful.

Warning! Use these at your own risk! No support is offered for these.

Opening multiple pop up windows using onLoad (from one originating page)



Javascript Pop Up Window Tool

We usually hate them, but just in case you need one, here's an easy way to generate a popup window with the code all in your link.

ERROR: your javascript is not enabled

url to popup:
  Yes     No
toolbar:    
location:    
directories:   
status:    
menubar:    
scrollbars:    
resizable:    
width:  height: 
left position:  top position: 




"pMachine Profile Image Handler"

Warnings! First: I don't remember what version of pMachine this was for! Also: this is a script modification and things could get messed up very easily. Remember, you'll lose this mod if you upgrade! Implementing this mod includes disabling the user's ability to change their 'Display Name'.

The script to upload images for the Member Profile is called Bill's Image-Uploader & Resizer Version 3.1.

After getting a copy of the script, get the instructions for the mod here


Use of .htaccess to block remote server file access



Execute CGI using PHP



Random CSS using PHP

To use this, name your style sheets consecutively... 1.css, 2.css, 3.css, etc... then, change the '4' to what ever number of styles you are using.