Re: Popups from links
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Popups from links

From: Sjoerd <sjoerder@gmail.com>
Date: Fri Mar 31 2006 - 11:51:56 CEST

Bill Ray wrote:
> I have a script that allows my website to display the contents of a
> folder as links. I want those links to open as their MIME type (MP3
> files) in a small window, displaying that file's name as an H2 tag.

Small window, that implies javascript:
HTML: <a href="URL" onClick="window.open('URL', 'window_name',
'window_options'); return false">

URL would be something like this:
<? $url = "show.php?file=".urlencode($filename); ?>
which expands to:
show.php?file=Britney.mp3

In show.php, there is something like this:
<? echo "<h2>".$_GET['file']."</h2>"; ?>
$_GET['file'] would hold Britney.mp3.
Received on Mon May 1 02:45:40 2006