|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a question that I hope has an answer. I'm working on a website project which I can't talk about until the project is launched, but, my client wants to have all of the buttons on the page push when the mouse is clicked (rollover down) and that is generated in Java Script. Now he also wants to include a live news ticker on one of the pages.
My problem is that this is also Java Script and the instructions for the news ticker say to put it between the header tags which is where the script for the buttons lives. So on my pages without the news ticker the buttons light up and push just as they are supposed to. But when I paste in the news ticker script it cancels out the movement of the buttons. The links still work but the buttons no longer push. The news ticker works just fine but the buttons are now static. I am a graphic designer and not a programmer so I have no idea if there is something I can do to alleviate this problem. Is there a simple fix for this situation. Thank you, David Griffith david@graphyx.com 503.254.8312 Graphyx Media Design and Digital Illustration <head> <title>Welcome To xxxxxxx.com</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- ImageReady Preload Script (NewFront1f-1.psd) --> <script type="text/javascript"> <!-- function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i<changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; } } } var preloadFlag = false; function preloadImages() { if (document.images) { home_down = newImage("images/home-down.jpg"); about_ann_down = newImage("images/about-ann-down.jpg"); conservative_issues_down = newImage("images/conservative-issues-down.jpg"); faq_down = newImage("images/faq-down.jpg"); web_security_down = newImage("images/web-security-down.jpg"); contact_us_down = newImage("images/contact-us-down.jpg"); subscribe_down = newImage("images/subscribe-down.jpg"); american_news_down = newImage("images/american-news-down.jpg"); american_blogs_down = newImage("images/american-blogs-down.jpg"); conservative_editorials_down = newImage("images/conservative-editorials-dow.jpg"); veterans_assistance_down = newImage("images/veterans-assistance-down.jpg"); terrorism_watch_down = newImage("images/terrorism-watch-down.jpg"); christian_resources_down = newImage("images/christian-resources-down.jpg"); preloadFlag = true; } } // --> </script> <script language="javascript"> //Specify the marquee's width (in pixels) var marqueewidth="300px" //Specify the marquee's height var marqueeheight="200px" //Specify the marquee's speed (larger is faster 1-10) var marqueespeed=1 //Pause marquee onMousever (0=no. 1=yes)? var pauseit=1 //Absolute positioning var yCoord=400 var xCoord=200 </script> |
|
||||
|
I would try taking the first javascript out and placing it in an external .js file and link to it from the head section of each page like this:
1. Copy and paste this portion of your javascript into a text file with any text editor and save as newJSfile.txt: function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i<changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; } } } var preloadFlag = false; function preloadImages() { if (document.images) { home_down = newImage("http://www.webproworld.com/images/home-down.jpg"); about_ann_down = newImage("http://www.webproworld.com/images/about-ann-down.jpg"); conservative_issues_down = newImage("http://www.webproworld.com/images/conservative-issues-down.jpg"); faq_down = newImage("http://www.webproworld.com/images/faq-down.jpg"); web_security_down = newImage("http://www.webproworld.com/images/web-security-down.jpg"); contact_us_down = newImage("http://www.webproworld.com/images/contact-us-down.jpg"); subscribe_down = newImage("http://www.webproworld.com/images/subscribe-down.jpg"); american_news_down = newImage("http://www.webproworld.com/images/american-news-down.jpg"); american_blogs_down = newImage("http://www.webproworld.com/images/american-blogs-down.jpg"); conservative_editorials_down = newImage("http://www.webproworld.com/images/conservative-editorials-dow.jpg"); veterans_assistance_down = newImage("http://www.webproworld.com/images/veterans-assistance-down.jpg"); terrorism_watch_down = newImage("http://www.webproworld.com/images/terrorism-watch-down.jpg"); christian_resources_down = newImage("http://www.webproworld.com/images/christian-resources-down.jpg"); preloadFlag = true; } } 2. Upload newJSfile.txt to your website. 3. Rename the file to newJSfile.js 4. Then add the code below between the <head> tags to link to your new external javascript file: <script type="text/javascript" src="http://www.YourSite.com/newJSfile.js"></script> Upright Headstones
__________________
James Allen Last edited by james113; 09-12-2008 at 08:37 PM. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java Script in FireFox | matheen | Graphics & Design Discussion Forum | 1 | 03-24-2007 11:43 AM |
| Java script in navigation bar for SEO | amar | Search Engine Optimization Forum | 14 | 10-05-2005 03:19 AM |
| Yahoo and Java Script | pabloroberto | Yahoo! Discussion Forum | 1 | 12-23-2004 01:03 PM |
| Compatible Java Script? | C French | Web Programming Discussion Forum | 1 | 11-11-2004 02:54 PM |
| The Ghost Java Script!! | Txarán | Web Programming Discussion Forum | 3 | 06-15-2004 11:46 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |