PDA

View Full Version : [Paying $$!] Upload script - pass filename to input box



bopxb
28 Sep 2009, 08:16 PM
First off I'd like to state that anyone who helps me with this problem will receive $30 dollars through paypal.

Okay I have implemented the FancyUpload Attach-A-File (http://digitarald.de/project/fancyupload/) script into my web page and it works wonderfully. I have it customized to my liking, I just need to pass the file name as part of the form on the same page. Here is a link (http://www.bumptune.com/upload_script.zip) to the script files I'm using on my site.

In script.php I change the file name so that spaces are replaced by underscores and a date is added on. The new file name is stored in the variable $new_name .

In script.js there is a line that successfully changes the input box with name and id 'url', to text that i specify after the upload is done. I just cannot figure out how to call the $new_name variable from script.php into my script.js file so that I can add it to the input box. Maybe there is a better way to do it, I am leaving that up to you to figure out.

Note, I do not need the file path as all uploads go to the same directory... I just need the modified file name.

A little more info...
I am using this script in conjunction with the Pligg CMS...
The upload scripts are imported in pligg.tpl in between the comments in the head
The upload html is in submit_step_1.tpl and it is these lines:


<a href="#" id="demo-attach">Click To Upload</a>
<ul id="demo-list"></ul>
<a href="#" id="demo-attach-2" style="display: none;"><!--Attach another file--></a>
</div>


PM me for my e-mail or screen name or even phone number if you are serious about helping me with this script. Thanks in advance for anyone that helps!

bopxb
02 Oct 2009, 08:25 PM
problem solved, feel free to lock this mods :smash: