944,205 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 10012
  • ColdFusion RSS
Feb 8th, 2007
0

Coldfusion image upload w. javascript thumbnail preview

Expand Post »
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:

http://www.air4web.com/files/upload/
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
forumposters is offline Offline
25 posts
since May 2006
Feb 17th, 2007
0

Re: Coldfusion image upload w. javascript thumbnail preview

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

<?php
$ftmp = $_FILES['image']['tmp_name'];
$oname = $_FILES['image']['name'];
$fname = 'upload/'.$_FILES['image']['name'];
if(move_uploaded_file($ftmp, $fname)){
?>
<html><head><script>
var par = window.parent.document;
var images = par.getElementById('images');
var imgdiv = images.getElementsByTagName('div')[<?=(int)$_POST['imgnum']?>];
var image = imgdiv.getElementsByTagName('img')[0];
imgdiv.removeChild(image);
var image_new = par.createElement('img');
image_new.src = 'resize.php?pic=<?=$oname?>';
image_new.className = 'loaded';
imgdiv.appendChild(image_new);
</script></head>
</html>
<?php
exit();
}
?><html><head>
Reputation Points: 10
Solved Threads: 1
Light Poster
forumposters is offline Offline
25 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: Coldfusion Email Server Software
Next Thread in ColdFusion Forum Timeline: Coldfusion Scheduled Tasl





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC