I've found a script that does almost exactly what I need but it uses PHP - I know nothing about PHP. Anyone here want to help me convert the PHP to Coldfusion? It's not a whole lot of code. Here's a demo and the source code is below the demo:


Perhaps someone could just help me convert the PHP line below from PHP to Coldfusion and that would be a good start.

$ftmp = $_FILES;
$oname = $_FILES;
$fname = 'upload/'.$_FILES;
if(move_uploaded_file($ftmp, $fname)){
var par = window.parent.document;
var images = par.getElementById('images');
var imgdiv = images.getElementsByTagName('div')[<?=(int)$_POST?>];
var image = imgdiv.getElementsByTagName('img')[0];
var image_new = par.createElement('img');
image_new.src = 'resize.php?pic=<?=$oname?>';
image_new.className = 'loaded';