Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Trouble getting 2 javascripts to run on same web page ?
Old 07-22-2010, 01:24 PM Trouble getting 2 javascripts to run on same web page ?
Experienced Talker

Posts: 30
Trades: 0
Hi

Thank again for the couple of members that took the time to reply.

I have found a slider/scroller resource and adapted it for my website, please see below:

http://www.acknowledgedtest.info/home-slider.html

The problem is that I have had to remove the following js from the bottom of the <body>;

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/jquery.nivo.js"></script>
<script type="text/javascript" src="js/cufon.js"></script>
<script type="text/javascript" src="js/Geometr231_Hv_BT_400.font.js"></script>
<script type="text/javascript" src="js/script.js"></script>

and without this the main image banner animation will not work. How can I have both working?

If I replace the js above the top banner animation works perfectly but then the 3 box slider at the bottom doesn't ?

http://www.acknowledgedtest.info/index2.html

ARGGGGGGG so close yet not...

Please help me, how can I get both to work on the page together, or is there another way around this.

thanks

Ash
acknowledged74 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-22-2010, 02:16 PM Re: Trouble getting 2 javascripts to run on same web page ?
Extreme Talker

Posts: 246
Trades: 0
You may have to find out if there are any duplicate function names the might be overriding each other. Also are there any errors that come up or does it just stop working?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 07-22-2010, 02:21 PM Re: Trouble getting 2 javascripts to run on same web page ?
Experienced Talker

Posts: 30
Trades: 0
just doesn't work at all.
I take it other than duplicates there no reason 2 javascript can't run on same page?
acknowledged74 is offline
Reply With Quote
View Public Profile
 
Old 07-22-2010, 03:02 PM Re: Trouble getting 2 javascripts to run on same web page ?
Extreme Talker

Posts: 246
Trades: 0
If you are not getting any errors and the scripts just don't work together but do separately, I'd say it's conflicting names somewhere (global variables, function names)?

Have fun looking.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 07-22-2010, 06:48 PM Re: Trouble getting 2 javascripts to run on same web page ?
Experienced Talker

Posts: 30
Trades: 0
Oh OK sorry I included the index2.html just to show how the top scroller works as it didn't on the other.

The Premiere Opticians now has everything on it, the top animation works fine but when you click 'next' on the text box slider underneath, the slide/scroll doesn't take place.

I've added all the js files (as mentioned on the original post) one at a time and it definitely seems to be the "js/jquery.js" that's causing the problems, I presume it a conflict somewhere but my experience is with Xhtml and Css, my js knowledge isn't so good ?

The slider should work like this by the way;

Horizontal Carousel
acknowledged74 is offline
Reply With Quote
View Public Profile
 
Old 07-23-2010, 07:38 AM Re: Trouble getting 2 javascripts to run on same web page ?
Extreme Talker

Posts: 246
Trades: 0
Looks like there is an issue with the fact that the mootools slider uses declares $ and is causing a incompatibilities. Try looking at this page and follow the instructions.

http://api.jquery.com/jQuery.noConflict/
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 07-29-2010, 07:38 AM Re: Trouble getting 2 javascripts to run on same web page ?
Extreme Talker

Posts: 246
Trades: 0
Thanks ccarltonn45 for copying and pasting what I said above, thanks for adding nothing.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Trouble getting 2 javascripts to run on same web page ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37658 seconds with 12 queries