473,385 Members | 1,983 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,385 software developers and data experts.

Two scripts interfering with each other

I am definitely a Javascript novice. I am currently redesigning &
rebuilding my company's web site, using CSS & XHTML. I am trying to
build as "light" & compliant a site as possible. To that end, I have
found two CSS & JS solutions to two problems.

The first solution is a pop-down menu script, found here:
http://www.gazingus.org/html/Using_L...TML_Menus.html

The second solution rounds the corners [nifty corners] on boxes:
http://pro.html.it/articoli/id_599/idcat_31/pro.html

I added the menus to my pages first & got them working with no problem.
However, when adding the nifty corners script links, they didn't work.
The nifty corners script links were listed first in the head. If I
changed the order of the script links in the head [putting the menu
first], the corners would round, but the menus wouldn't work.

My page is here:
http://www.t2000inc.com/test/
[with the menu listed last & working]

My CSS:
http://www.t2000inc.com/test/techcss.css
http://www.t2000inc.com/test/niftyCorners.css

The javascript files:
menu: http://www.t2000inc.com/test/menuDropdown.js
nifty corners: http://www.t2000inc.com/test/nifty.js
& http://www.t2000inc.com/test/corners.js

Please let me know if you need more information or detail. Thanks in
advance for any help!
Anne

Jul 23 '05 #1
2 2237
"Anne Kosmicki" <ak*******@t2000inc.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I am definitely a Javascript novice. I am currently redesigning &
rebuilding my company's web site, using CSS & XHTML. I am trying to
build as "light" & compliant a site as possible. To that end, I have
found two CSS & JS solutions to two problems.

The first solution is a pop-down menu script, found here:
http://www.gazingus.org/html/Using_L...TML_Menus.html

The second solution rounds the corners [nifty corners] on boxes:
http://pro.html.it/articoli/id_599/idcat_31/pro.html

I added the menus to my pages first & got them working with no problem.
However, when adding the nifty corners script links, they didn't work.
The nifty corners script links were listed first in the head. If I
changed the order of the script links in the head [putting the menu
first], the corners would round, but the menus wouldn't work.

My page is here:
http://www.t2000inc.com/test/
[with the menu listed last & working]

My CSS:
http://www.t2000inc.com/test/techcss.css
http://www.t2000inc.com/test/niftyCorners.css

The javascript files:
menu: http://www.t2000inc.com/test/menuDropdown.js
nifty corners: http://www.t2000inc.com/test/nifty.js
& http://www.t2000inc.com/test/corners.js

Please let me know if you need more information or detail. Thanks in
advance for any help!
Anne


And if JavaScript is disabled then no menues!
Jul 23 '05 #2
Anne Kosmicki wrote:
I am definitely a Javascript novice. I am currently redesigning &
rebuilding my company's web site, using CSS & XHTML. I am trying to
build as "light" & compliant a site as possible. To that end, I have
found two CSS & JS solutions to two problems.

The first solution is a pop-down menu script, found here:
http://www.gazingus.org/html/Using_L...TML_Menus.html

The second solution rounds the corners [nifty corners] on boxes:
http://pro.html.it/articoli/id_599/idcat_31/pro.html

I added the menus to my pages first & got them working with no problem. However, when adding the nifty corners script links, they didn't work. The nifty corners script links were listed first in the head. If I
changed the order of the script links in the head [putting the menu
first], the corners would round, but the menus wouldn't work.

My page is here:
http://www.t2000inc.com/test/
[with the menu listed last & working]

My CSS:
http://www.t2000inc.com/test/techcss.css
http://www.t2000inc.com/test/niftyCorners.css

The javascript files:
menu: http://www.t2000inc.com/test/menuDropdown.js
nifty corners: http://www.t2000inc.com/test/nifty.js
& http://www.t2000inc.com/test/corners.js

Please let me know if you need more information or detail. Thanks in
advance for any help!
Anne


Typical problem when pasting in multiple scripts: *dueling onloads*.
window.onload is an object property; like any other variable, multiple
assignments will simply over-write previous ones.

in "corners.js":

window.onload = function() { if(!NiftyCheck()) return;
Rounded("div#market li","all","transparent","#177F99","smooth");
Rounded("div#marketbox p","tr bl","#fff","#177F99","smooth"); }

in "http://www.t2000inc.com/test/":

window.onload = function() {
initializeMenu("trainingMenu", "trainingActuator");
initializeMenu("elearnMenu", "elearnActuator");
initializeMenu("partnersMenu", "partnersActuator");
initializeMenu("aboutUsMenu", "aboutUsActuator");
initializeMenu("contactMenu", "contactActuator");
}

Just remove the first and add it to the second:

window.onload = function()
{
initializeMenu("trainingMenu", "trainingActuator");
initializeMenu("elearnMenu", "elearnActuator");
initializeMenu("partnersMenu", "partnersActuator");
initializeMenu("aboutUsMenu", "aboutUsActuator");
initializeMenu("contactMenu", "contactActuator");
if(NiftyCheck())
{
Rounded("div#market li","all","transparent","#177F99","smooth");
Rounded("div#marketbox p","tr bl","#fff","#177F99","smooth");
}
}

Your menu needs a bit of work (mouse it to see). Cheers.

Jul 23 '05 #3

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

Similar topics

7
by: Dave Smithz | last post by:
Hi There, I have taken over someone else's PHP code and am quite new to PHP. I made some changes and have implemented them to a live environment fine so far. However, I now want to setup a...
2
by: eichin | last post by:
One of my recent projects has involved taking an accretion of sh and perl scripts and "doing them right" - making them modular, improving the error reporting, making it easier to add even more...
6
by: Alex Vilner | last post by:
Hello! We have a set of individual .SQL scripts which we would like to execute against a MS SQL Server 2000. Is there any way to have ISQL utility (or any other means) to execute all of them...
3
by: Giovanni Bassi | last post by:
Hello all, I have prepared a simple procedure to open forms only once. Here it is: -//- Private Sub OpenChildForm(ByRef objFormToOpen As System.Windows.Forms.Form, ByVal TypeToCreate As...
2
by: Dave Hughes | last post by:
Just noticed something rather annoying after upgrading my test box (a Linux server running DB2 UDB v8 for LUW) to fixpak 11 (for reference it was previously on fixpak 7). In the past I've relied...
24
by: Mark | last post by:
Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm...
3
by: randommale9999 | last post by:
I was wondering how people are able to create ajax applications like star ratings scripts without having bots hit the scripts. I have a star rating script on my site which was getting hit by bots....
9
by: dirk.dircksen | last post by:
Hi I've searched quite a bit and haven't been able to find an answer to this one: We're in the process of installing .Net 2.0 on our production servers (all Windows 2000 servers). None of the...
3
by: downwitch | last post by:
Hello, I've run as many keyword combinations searching for this as I can think of, but cannot find a simple answer. The situation: I have a database that is mid-conversion/redevelopment. I...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.