User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 391,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,576 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 6174 | Replies: 1
Reply
Join Date: May 2006
Location: Calpines, California
Posts: 25
Reputation: forumposters is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
forumposters forumposters is offline Offline
Light Poster

Coldfusion image upload w. javascript thumbnail preview

  #1  
Feb 8th, 2007
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/
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: Calpines, California
Posts: 25
Reputation: forumposters is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
forumposters forumposters is offline Offline
Light Poster

Re: Coldfusion image upload w. javascript thumbnail preview

  #2  
Feb 17th, 2007
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>
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 9:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC