[WEB4LIB] Re: Javascript or CSS question?
Blake Carver
btcarver at lisnews.com
Fri May 4 18:55:55 EDT 2001
Here's an easy way to do it from PHP it just opens a little text file and
reads from it and then spits the items into a drop down.
I would assume it would be just as easy in asp, perl, etc...
Javascript (I think) could do it too, though I may be wrong on that one.
Your syntax will vary!
<?php
if(! $array = @file('items.txt'))
die("can't read it");
echo "<select name=\"blabla\">";
while(list($i,$line) = each($array))
{
echo "<option>$i: $line</option>\n";
}
echo "</select>
?>
---------------------
Blake Carver
LISNews.com
http://www.lisnews.com
Librarian and Information Science News
----- Original Message -----
>
> On Fri, 4 May 2001, Drew, Bill wrote:
>
> > I have been upgrading our library webpages to use CSS and have also
added a
> > "quicklinks" pull down menu form to allow those who know where they want
to
> > got to do so more quickly. Is there any way other than SSI or such to
get a
> > pull down menu that I can modify from just one file that will either be
> > called by a script in the pull down menu or via CSS? I am thinking
along
> > the lines of arrays but can't find a good example to work from. I want
to
> > be able to add new links to one file and have it appear from all the
pages.
> > ___________________
> > Wilfred (Bill) Drew
> > Associate Librarian, Systems and Reference
> > SUNY Morrisville College Library
> > E-mail: mailto:drewwe at morrisville.edu
> > BillDrew.Net: http://billdrew.net/
> > Not Just Cows: http://people.morrisville.edu/~drewwe/njc/
> > Library: http://www.morrisville.edu/library/
> > Wireless Librarian: http://people.morrisville.edu/~drewwe/wireless/
> > Have Laptop -- Will Travel.
> > "You teach a child to read, and he or her will be able to pass a
literacy
> > test.''- George W. Bush; Townsend, Tenn., Feb. 21, 2001
> >
>
>
More information about the Web4lib
mailing list