[PHP] Re: drop down menu populated from a directory

2004-06-01 Thread Torsten Roehr
"Dustin Krysak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ok - here is the relevant Quicktime code:
>
> 
>  width="320" height="256"
> codebase="http://www.apple.com/qtactivex/qtplugin.cab";>
>
>
> value="http://www.apple.com/quicktime/download/indext.html";>
>
>
>
> autoplay="true" controller="true" border="0"
> pluginspage="http://www.apple.com/quicktime/download/indext.html";
> target="myself">
> 
> 
>
> Now I figure - getting the file name in there would be pretty easy (for
> the most part), but the thing is getting the dimensions of the movie in
> there... as it is possible that not all movies are the same dimensions.
> I am hoping to have just the one PHP that will change dynamically for
> the QT content - I would like to avoid having a php or html file for
> each QT movie.
>
> d
>
> PS - please CC me directly as I am subscribed in digest mode.. thanks
> much!

Put an if check around your QT placeholder code:

if (isset($_POST['nameOfYourSelectBox'])) {

// placeholder code

}

Set your embed src-tag to:

src="../../../mov/"

So if you submit your select box the selected movie should be shown. Maybe
you can omit the width and height attributes.


Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: drop down menu populated from a directory

2004-05-31 Thread Dustin Krysak
Ok - here is the relevant Quicktime code:

http://www.apple.com/qtactivex/qtplugin.cab";>
  
  
  http://www.apple.com/quicktime/download/indext.html";>
  
  
  
  http://www.apple.com/quicktime/download/indext.html"; 
target="myself">



Now I figure - getting the file name in there would be pretty easy (for 
the most part), but the thing is getting the dimensions of the movie in 
there... as it is possible that not all movies are the same dimensions. 
I am hoping to have just the one PHP that will change dynamically for 
the QT content - I would like to avoid having a php or html file for 
each QT movie.

d
PS - please CC me directly as I am subscribed in digest mode.. thanks 
much!




On 31-May-04, at 3:08 PM, [EMAIL PROTECTED] wrote:
"Dustin Krysak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
ok, I added brackets and made my code to:

if ($file != '.' && $file != '..') {
$fileName = str_replace('.mov', '', $file);
echo '' .
$fileName . '';
}
}
closedir($handle);
}
?>
when viewing my page in a browser, it worked! Now what I am hoping to
do is put this menu on a PHP page, and have a qt movie placeholder and
when this menu is used - replace the placeholder with the selected qt
movie... I am just not sure how to do this.
This should be easy. Please post your QT placeholder (HTML) code. Then 
we
can help.

Regards, Torsten
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: drop down menu populated from a directory

2004-05-31 Thread Torsten Roehr
"Dustin Krysak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> ok, I added brackets and made my code to:
>
>  if ($handle = opendir('../../../mov')) {
> while (false !== ($file = readdir($handle))) {
>
> if ($file != '.' && $file != '..') {
>
> $fileName = str_replace('.mov', '', $file);
> echo '' .
> $fileName . '';
> }
> }
> closedir($handle);
> }
> ?>
>
> when viewing my page in a browser, it worked! Now what I am hoping to
> do is put this menu on a PHP page, and have a qt movie placeholder and
> when this menu is used - replace the placeholder with the selected qt
> movie... I am just not sure how to do this.

This should be easy. Please post your QT placeholder (HTML) code. Then we
can help.

Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: drop down menu populated from a directory

2004-05-31 Thread Dustin Krysak
ok, I added brackets and made my code to:

   if ($file != '.' && $file != '..') {
   $fileName = str_replace('.mov', '', $file);
   echo '' . 
$fileName . '';
   }
   }
   closedir($handle);
}
?>

when viewing my page in a browser, it worked! Now what I am hoping to 
do is put this menu on a PHP page, and have a qt movie placeholder and 
when this menu is used - replace the placeholder with the selected qt 
movie... I am just not sure how to do this.

Thanks in advance!
d

On 31-May-04, at 10:26 AM, Dustin Krysak wrote:
I gave it a go, and I got the error:
"Parse error: parse error, unexpected '}'"
This was on the last "}". Now I am brand new at php, but should there 
not be an opening and closing curly bracket? in this code there are 
one "{" and three "}"

So I made my code:

   if ($file != '.' && $file != '..')
   $fileName = str_replace('.mov', '', $file);
   echo '' . $fileName . 
'';
   closedir($handle);
}
?>

And it does display the name in the menu... so that is a good start, 
but the link doesn't work when selected. So I am assuming hte code 
does need those brackets, and I rather need to open the opening one...

d

On 31-May-04, at 2:39 AM, [EMAIL PROTECTED] wrote:
From: "Torsten Roehr" <[EMAIL PROTECTED]>
Date: May 30, 2004 5:14:28 PM PDT
To: [EMAIL PROTECTED]
Subject: Re: drop down menu populated from a directory
"Dustin Krysak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi there
What I am hoping to do is have a drop down menu that would be 
populated
from the contents of a directory via php. Now The link names would be
generated by the file name minus the file extension. Has anyone seen 
a
tutorial on accomplishing something like this? All of the links would
be to quicktime movies, but I am hoping to have them embedded in HTML
(or PHP). So the movie is displayed in a browser

thanks in advance!
This should do the trick:
// opening select tag goes here...
if ($handle = opendir('/path/to/files')) {
   while (false !== ($file = readdir($handle)))
   if ($file != '.' && $file != '..')
   $fileName = str_replace('.mov', '', $file);
   echo '' . $fileName . 
'';
   }
   }
   closedir($handle);
}

// closing select tag goes here
Haven't tested it. Hope it works and helps ;)
Regards,
Torsten Roehr

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: drop down menu populated from a directory

2004-05-30 Thread Torsten Roehr
"Dustin Krysak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there
>
> What I am hoping to do is have a drop down menu that would be populated
> from the contents of a directory via php. Now The link names would be
> generated by the file name minus the file extension. Has anyone seen a
> tutorial on accomplishing something like this? All of the links would
> be to quicktime movies, but I am hoping to have them embedded in HTML
> (or PHP). So the movie is displayed in a browser
>
> thanks in advance!

This should do the trick:

// opening select tag goes here...

if ($handle = opendir('/path/to/files')) {
   while (false !== ($file = readdir($handle)))

   if ($file != '.' && $file != '..')

   $fileName = str_replace('.mov', '', $file);
   echo '' . $fileName . '';
   }
   }
   closedir($handle);
}

// closing select tag goes here

Haven't tested it. Hope it works and helps ;)

Regards,

Torsten Roehr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Drop Down Menu

2001-07-28 Thread Jonas Delfs

"Manu Verhaegen" <[EMAIL PROTECTED]> skrev i en meddelelse
E10E651CDD2DD5118912E8E8C70F53D0@COMPUVER01">news:E10E651CDD2DD5118912E8E8C70F53D0@COMPUVER01...

> I have the following question : if i make a selection in the drop down
menu
> and click on submit button then the color will send to form2.php
> I want not click on the submit button
> i make a selection in the drop down menu then the color will send
automatic
> to form2.php, how can I do this

PHP is serverside - and this is why you can't du it in PHP. Try asking in a
javascript-group.

--
Mvh./Best Regards
Jonas Delfs, http://delfs.dk

"Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases." - IDC



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]