[Mediawiki-l] Creating Pulldown Menus
Willem-Jan van Strien
wjvs at xs4all.nl
Mon Sep 25 21:05:09 UTC 2006
I posted this as I joined, but since I haven't seen it in the mailing
lists, I think I might've done something wrong.
First of all, pardon me if this doesn't go here, but I'm a brandnew
MediaWiki user and I turned here because I couldn't find a solution to
my problem anywhere. So, I'm hoping maybe you can. (And also, I hope
this is what the mailinglist is intended for, although I'd appreciate it
if you'd tell me if it wasn't)
I've created my Wiki (currently running here
<http://lyrcanna.xtservices.net>) for use in my Pen&Paper Roleplaying
Campaign so my players have an easily accesible database of 'everything'
in the campaign world.
So I wanted to create an index in the MediaWiki:Sidebar which currently
has the standard:
* Main Page
* Community portal
* Current events
* Recent changes
* Random page
* Help
* Donations
Now I'm working on reforging this whole thing into a simple
* Introduction
* Chapter 1 - History
* Chapter 2 - Regions
* etcetera...
For this, I consulted a friend of mine who is fluent (-ish) in java
programming for information on how to add a pull-down menu to this. So
that if someone would click on let's say Chapter 1, he'd get
* Introduction
* Chapter 1 - History
* A - The First Age
* B - The Second Age
* etcetera...
* Chapter 2 - Regions
* etcetera...
He forwarded me the following HTML code:
Quote:
Originally Posted by *HTML-code*
<HTML>
<HEAD>
<TITLE>Lyrcanna Wiki Example 2</TITLE>
<script src="showHide.js"></script>
</HEAD>
<BODY>
<ul>
<li><a href="javascript:showhide(Peral);">Peral, God of the Sun</a></li>
<span id="Peral" style="display:none">
<ul>
<li>Portfolios: Day, Fire, Justice, Law, Light, Sun</li>
<li>Portfolios: Number 2, Healthy and Youthful</li>
</ul>
</span>
<li><a href="javascript:showhide(Anastay);">Anastay, Goddess of the
Moon</a></li>
<span id="Anastay" style="display:none">
<ul>
<li>Portfolios: A other one</li>
</ul>
</span>
</ul>
</BODY>
<HTML>
Which can be viewed here <http://test.xtservices.net/LyrcannaTest2.htm>.
He also wrote the showHide.js applet that makes this whole thing tick.
However, nomatter what I do, I can't get it running in the SideBar.
Would any of you know how to implement this code?
Or would any of you know of another way of implementing the
functionality I'm looking for?
EDIT: I just noticed that the java applet doesn't appear to be working
on my test-site for it either. However, this is probably due to the
workings of java-applets in combination with the suppliers of my domain
space and not due to the fact that the html-code isn't supported (which
'is' the case on the mediawiki I think).
Thought I'd supply you with the contents of the java applet too... Just
in case.
Quote:
Originally Posted by *showHide.js*
var Open = ""
var Closed = ""
function showhide(what){
if (what.style.display=='none'){
what.style.display='';
}
else{
what.style.display='none'
}
}
Greetings,
Willem-Jan van Strien
/The Netherlands/
More information about the MediaWiki-l
mailing list