Forum Moderators: coopster

Message Too Old, No Replies

Return a name to a text area

         

havoc

1:08 am on Jun 18, 2003 (gmt 0)

10+ Year Member



I have never had to do a return function before i am not sure on how to do it .. what i want to do is generate a list
of files... and when i click on the file it returns the name to a textbox help would be appreciated in not even sure if i coded this right..

<the form is here textbox i want to return to is "picname">
$absolute_path = "/path/to/path";
$directory = "funnies/";
switch($action) {
default:
$opendir = "$absolute_path$directory";
$dir = opendir($opendir);
$count = 0; (used later in script)
$bgc = 0;
while($file = readdir($dir)) {
if (($file!= "..") and ($file!= ".")) {
$count++;

$list .= "Picture $count - <return code here i guess > directory=$directory&file=$file";

echo $list;

this is cut down of the main php help would be appreciated i tried looking on google for the return function but it wasnt explained properly

jatar_k

6:20 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what about writing a little javascript with your php that onClick can write your value into your textbox.

How's your javascript? ;)

havoc

3:14 am on Jun 20, 2003 (gmt 0)

10+ Year Member



about as crap as my php :D

how would i on.click this

i haveta return the image name "punk.jpg" to text box "picname"

havoc

1:01 pm on Jun 20, 2003 (gmt 0)

10+ Year Member



nevermind :D i dont need it anymore