473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Fine. Now how about a working demo?

http://www.scit.wlv.ac.uk/~jphb/javascript/emenu.html

This site clearly shows in diagram form of my basic layout.
But he only explains what each function does.
There is no working sample I can find.

As a long shot, I wrote to the author to see if he does have one.

Jul 23 '05 #1
2 1123
Richard wrote:
http://www.scit.wlv.ac.uk/~jphb/javascript/emenu.html

This site clearly shows in diagram form of my basic layout.
But he only explains what each function does.
There is no working sample I can find.

As a long shot, I wrote to the author to see if he does have one.


This is not a lonely hearts forum. Why do I, or anyone else care about
this site?
--
Zif
Jul 23 '05 #2
Richard wrote:
http://www.scit.wlv.ac.uk/~jphb/javascript/emenu.html

This site clearly shows in diagram form of my basic layout.
But he only explains what each function does.
There is no working sample I can find.

As a long shot, I wrote to the author to see if he does have one.


Did you try pasting his code into a new page? It works in my IE6,
Netscape 7.2, Firefox 1.0.

<script type="text/javascript">
var Shropshire = new Object();
Shropshire.Towns = new Array ("Bridgnorth","Ludlow","Shrewsbury","Telford");
Shropshire.Status = "contracted";
var Staffordshire = new Object();
Staffordshire.Towns = new Array
("Cannock","Lichfield","Stafford","Stoke","Uttoxet er");
Staffordshire.Status = "contracted";
var WestMidlands = new Object();
WestMidlands.Towns = new Array
("Birmingham","Coventry","Dudley","Sandwell","Wals all","Wolverhampton");
WestMidlands.Status = "contracted";
function doList(curr){
var ref = eval(curr.id);
if(ref.Status == "contracted") {
ref.Status = "expanded";
var list = document.createElement("ul");
var i;
for(i=0;i<ref.Towns.length;i++) {
var newText = document.createTextNode(ref.Towns[i]);
var newNode = document.createElement("li");
newNode.appendChild(newText);
list.appendChild(newNode);
}
curr.appendChild(list);
ref.Sublist = list;
}else{
curr.removeChild(ref.Sublist);
ref.Status = "contracted";
}
}
</script>
</head>

<body>
<ul>
<li id="Staffordshire" onclick="doList(this)">Staffordshire
<li id="Shropshire" onclick="doList(this)">Shropshire
<li id="WestMidlands" onclick="doList(this)">West Midlands
</ul>
Mike
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Shannon | last post by:
I got a free version of Visual Studio 2002 Professional from a Microsoft .NET Student Conference in Toronto about a year ago. I had to wait until I got Windows XP to install it and now that I have,...
2
by: Unknown User | last post by:
I am trying to implement XMLHttpRequest to a new website, but when I include HTML, the code appears as is, instead of the formated HTML. Please have a look and click the 1st link ("L'Association")...
2
by: Athanasius | last post by:
Could someone shed some light as to why the following setTimeout function will not work on the Mac IE5.2? It does however work on PC(Forefox,Netscape,IE) & Mac(Safari,Firefox). Here is the script,...
3
by: Bob | last post by:
Below is some code that use to work. Now it is not and I have yet to figure out why. I want to select the nodes to a nodelist and remove them from the dom. The only thing I can figure is it broke...
5
by: R.A.M. | last post by:
Hello Could you help a beginner with login implementation using asp:Login (.NET 2.0). I have in Web.config: <authentication mode="Forms"> <forms name="Demo.NET" loginUrl="Default.aspx" />...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
5
by: Andrew P | last post by:
Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows...
1
by: Theadmin77 | last post by:
I am trying to create a script that will have a drop down menu and will load the web page selected . For some reason my function doesnot load the web page selected on the drop down menu What i am...
4
by: jbrown007 | last post by:
Have a form that works with FF, Chrome but not working with any version of IE. http://www.tetonvillagesports.net/reso.htm the contact.php script is as follows: <?php /* Set e-mail recipient...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.