Solved

Menu Script Not Working

Posted on 2009-07-15
3
231 Views
Last Modified: 2012-05-07
If you go here: http://www.morgancc.edu/index.php/academics/find-a-class/fort-morgan-campus you will see a form select-based menu at the top of the page. This is supposed to be chained menu where the input in one box affects the others. It works fine on my local computer but once I dropped it into my Joomla template, as you can see, it is not loading the script. As far as I know, everything is routed correctly and I've included "onLoad" on the body tag.

Can anyone shed some light into what is going on??  I believe it could be a conflict issue, but I'm sure how to fix it. (Not a JavaScript coder!) Thank you!
0
Comment
Question by:TEades
  • 2
3 Comments
 
LVL 11

Expert Comment

by:j-b-t
ID: 24865867
Hi TEades

I'm thinking that when you embedded the form (in the ?article? or is it in eth template) some data may have been stripped by teh editor.

Can you tell me where it's embedded and supply the form code?

0
 
LVL 2

Author Comment

by:TEades
ID: 24868621
I embedded the form code directly into the Joomla! template using Dreamweaver so in this case, I'm not thinking it would be an issue of one of Joomla's editors stripping anything (which they CAN do).

BUT, here is the code that I took directly from the author's file.  Thank you for your help!

<html>
 
<head>
<title>Chained Selects</title>
<script language="javascript" src="chainedmenu.js">
 
/***********************************************
* Chained Select Menu- By Xin Yang (http://www.yxscripts.com/) & Dynamic Drive (http://dynamicdrive.com)
* Script featured on/available at http://www.dynamicdrive.com/
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for legal use!
***********************************************/
 
</script>
<script language="javascript" src="config.js"></script>
 
</head>
 
<body onLoad="initListGroup('chainedmenu', document.listmenu0.firstlevel, document.listmenu0.secondlevel, document.listmenu0.thirdlevel, 'savestate')">
 
<form name="listmenu0">
<table align="center"><tr>
<td><select name="firstlevel" style="width:180px;"></select></td>
<td><select name="secondlevel" style="width:160px;"></select></td>
<td><select name="thirdlevel" style="width:160px;"></select></td>
<td><input type="button" value="Go" onClick="goListGroup(document.listmenu0.firstlevel, document.listmenu0.secondlevel, document.listmenu0.thirdlevel)">
 <input type="button" value="Reset" onClick="resetListGroup('chainedmenu')">
</tr></table>
</form>
 
<h3>Notes</h3>
<ul>
<li>An arbitrary string ("savestate") is passed in as the last argument of function initListGroup() inside this page, "sample.html", enabling the session-only cookie persistent feature. What this means is that the script will save and load the last state of the chained Selection lists when you reload or return to this page. See the documentation in chainedmenu.html for more info.</li>
<li>Disable empty lists feature is enabled, so empty lists are disabled (grayed out).</li>
</ul>
 
<p align="center">Dynamic Drive- <a href="http://www.dynamicdrive.com/dynamicindex1/chainedmenu/">Chained Select Menu</a></p>
 
</body>
 
</html>

Open in new window

0
 
LVL 2

Accepted Solution

by:
TEades earned 0 total points
ID: 24870633
I found out that the error is being caused by a conflict with having all those JavaScripts within the same template.  To remedy this, I have fashioned a workaround where Joomla! wraps my template around a separate HTML file using an iframe.  (Not a fan of iframes, but it is working.

Thank you, j-b-t, for your help!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Capture logon name 13 73
How can i get the length? 7 33
Mobile page Scrolling down when refreshing 4 32
How to deal with the query string 8 23
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question