addeacher Posted January 14, 2007 Share Posted January 14, 2007 Anyone with a sample javascript for rollover image effect? 0 Quote Link to comment Share on other sites More sharing options...
generic Posted January 14, 2007 Share Posted January 14, 2007 buy a copy of dreamweaver, it will do it for you. OR go to any site you see it and copy their code 0 Quote Link to comment Share on other sites More sharing options...
addeacher Posted January 14, 2007 Author Share Posted January 14, 2007 i already have dreamweaver, but when i create a .js file there is no design interface its just coding. Tried google and not much result. 0 Quote Link to comment Share on other sites More sharing options...
adakist Posted January 14, 2007 Share Posted January 14, 2007 The .js file is not all there is to it, there's also the html. Doing a search on google results in plenty of image rollover samples: http://www.google.com/search?client...rollover&btnG=Google+Search 0 Quote Link to comment Share on other sites More sharing options...
addeacher Posted January 14, 2007 Author Share Posted January 14, 2007 see that already, didn't work for me. 0 Quote Link to comment Share on other sites More sharing options...
adakist Posted January 14, 2007 Share Posted January 14, 2007 There are quite a few examples there, are you sure you looked hard enough? 0 Quote Link to comment Share on other sites More sharing options...
addeacher Posted January 14, 2007 Author Share Posted January 14, 2007 think am gonna try something, if i create a html file in dreamweaver then save it as .js will this work? becasue when create a .js it gives no design view only code view. 0 Quote Link to comment Share on other sites More sharing options...
s1rk3ls Posted January 14, 2007 Share Posted January 14, 2007 The .js file is not all there is to it, there's also the html. Doing a search on google results in plenty of image rollover samples: http://www.google.com/search?client...rollover&btnG=Google+Search see that already, didn't work for me. I looked at 2 of the very first results, and both offered very simple versions of javascript rollovers. I've used similar ones before - but try to avoid javascript whenever possible now for compatibility issues. These codes all go in your HTML file, these examples do not require a separate .js to run. Also, if you have more than one image you must have unique "name" values for each image. The simplest example would be: <a href="link.html" onMouseOver="document.image1.src='onImage.gif'" onMouseOut="document.image1.src='outImage.gif'"> [img=outImage.gif] Of course, you would need to change the link.html, onImage.gif, and outImage.gif to your filenames. And when adding additional images, update all occurrences of image1 to a new unique value, such as image2, image3, etc. Really though, spend more time searching Google and other html/webdesign sites for answers to stuff like this. If you had, you would have found your answer hours ago and already be working on your next hurdle. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted January 14, 2007 Share Posted January 14, 2007 Do not use js if its just a simple rollover. If possible, just use css. 0 Quote Link to comment Share on other sites More sharing options...
generic Posted January 14, 2007 Share Posted January 14, 2007 here are free ones in css you may be able to use: http://e-lusion.com/design/menu/ 0 Quote Link to comment Share on other sites More sharing options...
addeacher Posted January 14, 2007 Author Share Posted January 14, 2007 Thanks a lot for all the help and support guys it was a experience for me with the programing, at first we thought about letting the designer that did our site do this but then we thought let whmcs do it but after thought maybe i should give it a shot, if i fail then we will let whmcs do it, so far so good i was able to find a nice script.js that did it more than nice enough, now no more iframe so no more reloading everytime going to different page. Just a few questions though, which is better css or java? and why not to use java if its a simple rollover. Thanks again guys much appreciated. 0 Quote Link to comment Share on other sites More sharing options...
Willx Posted January 14, 2007 Share Posted January 14, 2007 i think css is better.. its less files, i mean you need a css file anyway so might as well use less files and go with strait css.. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 15, 2007 Share Posted January 15, 2007 i think css is better.. its less files, i mean you need a css file anyway so might as well use less files and go with strait css.. Less files? 2 images and one CSS file vs 2 images and one JS file? Maybe you meant less code in the page? 0 Quote Link to comment Share on other sites More sharing options...
addeacher Posted January 15, 2007 Author Share Posted January 15, 2007 Well seeing that i already did it with js i guess that's ok. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.