HTML - Basic Problem With Rollover Script
The website I am working on is he http://radarcartoons.com/test/test.html
I want each of those "blips" to change to the other pictures I have of them lit when you rollover it, but I can't figure out how to do a rollover script for multiple images on one page. The names of my alternate files are the same as the regular ones, except they have an _lit.jpg after them. So if it's 2.jpg, then the lit one would be 2_lit.jpg. I will also of course want to make them links to pages which i still have to make, but maybe the code just to make them links and an example link could show me how to get it working. Thanks a lot to anyone who can help me out on my big request! Similar TutorialsIm at the end of my line here, As crazy as this may sound I cant seem to get this to work. All I want to do is have a user input and email address, that will then post, on submit to a email account I have. I have tried (seriously) about 15 different tutorials and even a few already completed codes, and I only got it working once, then I deleted the code my accident... Anyways I need a very basic code that I can input into my page that will enable the above. And yes my server accepts PHP Iv checked and rechecked this, For some reason I just dont seem to get on with PHP. Iv been at this for a week?!? Please im going crazy here, help please.......... I seem to be having a problem with my image rollover effect in the header of my website. I am using CSS to call in the image. When using IE, the rollover happens much too slow. This doesn't seem to be a problem in firefox or safari. Any suggestions? Site: www.gallantgifts.com CSS: www.gallantgifts.com/css/master.css Thanks!! Hey guys, I'm a designer trying to code my website which is problem number 1. I'm trying to crreate these solid rollover states for my graphic headers on my nav (about and contact). I found a site that I plugged code from using javascript which i dont' know. The "about" link works fine but the "contact" link effects teh about link instead of targeting itself. Any help you can offer I would really appreciate. Thanks! here's my site: http://www.bru.us.com here's the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>BRU</title> <link rel="stylesheet" type="text/css" href="bru.css" /> <script type="text/javascript"> var revert = new Array(); var inames = new Array('about','contact'); // Preload if (document.images) { var flipped = new Array(); for(i=0; i< inames.length; i++) { flipped[i] = new Image(); flipped[i].src = "nav/"+inames[i]+"2.gif"; } } function over(num) { if(document.images) { revert[num] = document.images[inames[num]].src; document.images[inames[num]].src = flipped[num].src; } } function out(num) { if(document.images) document.images[inames[num]].src = revert[num]; } </script> </head> <body> <div id="header"> <img src="images/logo_gold.gif" /> </div> <div id="navigation"> <IMG SRC="images/nav_header_design.gif"/><br> <a href="about.html"class="catlink">TowerGroup</a><br> <a href="about.html"class="catlink">PSR</a><br> <a href="about.html"class="catlink">Click&Buy</a><br> <a href="about.html"class="catlink">MCA</a><br> <a href="about.html"class="catlink">Incretin Forum</a><br> <a href="about.html"class="catlink">Mastercard</a><br> <a href="about.html"class="catlink">Baraclude</a><br> <a href="about.html"class="catlink">IconNicholson</a><br> <a href="about.html"class="catlink">FIFA</a><br> <br> <br> <IMG SRC="images/nav_header_other.gif"/><br> <a href="india_photos.html"class="catlink">India</a><br> <br> <br> <a href="about.html"> <img src="nav/about1.gif" name="about" onMouseOver="over(0)" onMouseOut="out(0)"> </a><br><br> <a href="mca.html"> <img src="nav/contact1.gif" name="contact" onMouseOver="over(0)" onMouseOut="out(0)"></a><br> </div> <div id="portfolio"> <IMG SRC="images/towergroupmarketing/tw_moodboard.jpg"/>     </div> <div id="description"> <h1>TowerGroup / Moodboard</h1> <p> When TowerGroup came to us and talked about what they felt differentiated them from other financial institutions, one thing that stood out to me, was that they wanted to communicate that they're analysts are hands-on and accessible. To express this concept in a website, I thought mixing hand-drawn illustrations with photographs would help give the site a more personable feel. </p> </div> <!--Content--> <div style="position:absolute; top:474px; left:499px;"></div> </body> </html> Hello I have an issue with a rollover on my page. I'm building a website for AS level media coursework and need help with a code. The rollover is part of a table and is aimed to play music when the mouse hovers over it, while at the same time switching the image to another... The code for the rollover itself is: Code: <a href="#" onMouseOut="MM_swapImgRestore()""stopSound(0);" onMouseOver="MM_swapImage('Image9','','piece1.jpg',1)""playSound(0);"><img src="piece1hit.jpg" name="Image9" width="156" height="156" border="0"></a> The bad javascript for the image swap is: Code: <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> And finally the even worse coding for the sound is: Code: <SCRIPT LANGUAGE="JavaScript"><!-- var aySound = new Array(); aySound[0] = "Kylie.mp3"; aySound[1] = "fseven.mp3"; IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0; NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0; ver4 = IE||NS? 1:0; onload=auPreload; function auPreload() { if (!ver4) return; if (NS) auEmb = new Layer(0,window); else { Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>"; document.body.insertAdjacentHTML("BeforeEnd",Str); } var Str = ''; for (i=0;i<aySound.length;i++) Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>" if (IE) auEmb.innerHTML = Str; else { auEmb.document.open(); auEmb.document.write(Str); auEmb.document.close(); } auCon = IE? document.all.auIEContainer:auEmb; auCon.control = auCtrl; } function auCtrl(whSound,play) { if (IE) this.src = play? aySound[whSound]:''; else eval("this.document.embeds[whSound]." + (play? "play()":"stop()")) } function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); } function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); } //--></SCRIPT> I hope someone can resolve my issue for me, for I'm absolutely stumpted by this. I have very limited expertise in coding (as you can see) and would greatly appreciate any help I can recieve. Thank you for your time. I want some links to be different colors than others. I tried making a new class and the new links are now colored perfectly, but even though the links changes to the correct color when hovered over, it doesn't actually link... The arrow doesn't turn into a hand to click, it just changes colors, all be it correctly... I know this is very basic and i'm missing something very obvious. I had the standard a class links, and I created a 2nd class called c2... Here's what I have in my css siheet... Code: a, a:visited { color: #a8a2ee; text-decoration: none; } a:hover { color: #ff0000; text-decoration: none; } a img { border: none; } a:focus, a:hover, a:active { outline: none; } c2, b:visited { color: #ff0000; text-decoration: none; } c2:hover { color: #0c00ff; text-decoration: none; } c2 img { border: none; } c2:focus, c2:hover, c2:active { outline: none; } When I create a link like this... Code: <c2 href="http://itunes.apple.com/" target="_blank">download from iTunes</c2> It does not link... I think it has to be A and maybe have a sub class? I can't call links c2 maybe? So how would I do it? Thanks! Okay, it was all working great until I wanted to add another column to make the center logo clickable. Now I am having the problems with the little images being slightly out of alignment again. Any help would be greatly appreciated! The web address is: http://radarcartoons.com/test/test.html Here is the source code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Radar Cartoons </title> <style type="text/css"> * { margin: 0; border: 0; padding: 0; } body { background: #000000; text-align: center; } #wrapper { width: 1101px; margin: 0 auto; }</style> </head> <body><br /> <br /> <div id="wrapper"> <table cellspacing="0"> <tbody> <tr> <td><img src="1.jpg" alt="1" /></td> <td><br /> </td> <td><a href="/shows.html" onmouseover="document.circle1.src='2_lit.jpg'" onmouseout="document.circle1.src='2.jpg'"><img src="2.jpg" alt="Shows Page" name="circle1" height="161" width="145" /></a></td> <td><img src="3.jpg" alt="3" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="4.jpg" alt="4" /></td> <td><br /> </td> <td><a href="/news.html" onmouseover="document.circle2.src='5_lit.jpg'" onmouseout="document.circle2.src='5.jpg'"><img src="5.jpg" alt="News Page" name="circle2" height="151" width="140" /></a></td> <td><img src="6.jpg" alt="6" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="7_1.jpg" alt="7_1" /></td> <td><a href="/info.html"><img src="7_2.jpg" alt="7_2" /></a></td> <td><a href="/credits.html" onmouseover="document.circle3.src='8_lit.jpg'" onmouseout="document.circle3.src='8.jpg'"><img src="8.jpg" alt="Credits Page" name="circle3" height="148" width="148" /></a></td> <td><img src="9.jpg" alt="9" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="10.jpg" alt="10" /></td> <td><br /> </td> <td><a href="/links.html" onmouseover="document.circle4.src='11_lit.jpg'" onmouseout="document.circle4.src='11.jpg'"><img src="11.jpg" alt="Links Page" name="circle4" height="137" width="137" /></a></td> <td><img src="12.jpg" alt="12" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="13.jpg" alt="13" /></td> <td><br /> </td> <td><a href="/contact.html" onmouseover="document.circle5.src='14_lit.jpg'" onmouseout="document.circle5.src='14.jpg'"><img src="14.jpg" alt="Contact Page" name="circle5" height="133" width="126" /></a></td> <td><img src="15.jpg" alt="15" /></td></tr></tbody></table></div> </body> </html> I been reading books and taking online tutorials to start mixing php in with html, one of the basic examples from the books is echoing something unto a html site, done like this: <html> </body> <? echo "<p>Processed."; ?> </body> </html> The output should be the word "Processed" on the webpage but the output instead is this: Processed.";?> Everything after <p> is displayed. I checked the source code and this changes color: <? echo "<p> While everything else remains black and is displayed. I tried putting a </p> at the end and it reads it and sends everything after that to another line but it stills displays it. I also tried <h1> and others, everything time i open < and close> it stops reading and just displays everything after the > Simple ' instead of " don't change anything either. Any help or advice is appreciated. Hi Guys on this page www.thepullmanlodge.co.uk/weddings.htm the top 3 pictures are meant to slideshow into each other. When I preview the site in frontpage it works, but now I've uploaded it online it won't work and just shows the three pictures in a block. Can anyone help me get this working as it should? Thanks alot John I have started making a simple website with notepad which me and my friend could use. I've got a bit of a problem though. I know basic HTML but don't know how to get around this: In the folder I have two files: Lauch(Which opens the website), and a folder called Pages. In the folder 'Pages' I want the other pages for the website, but as his system would have different names, I can't exactly put: C:\My Files\HH Tool, if his is C:\His Files. Get me? I tried linking to: \Pages\Information.html . But it didn't work. I'd appreciate and answer ASAP. Thanks for whoever replies or answers. hey not too sure if I am overlooking something but i have my rollover buttons set up fine and they are working but whenever I click on them(my browser is google chrome), they produce a black rectangle just underneath, they also jump a bit when clicked. the site page is www.spaseafoods.com/Untitled-1.html and you will see the link buttons there, here is the code for the buttons; <a href="Untitled-1.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','/cooltext446156370MouseOver.png',1)"><img src="/cooltext446156370.png" name="Image7" width="87" height="39" border="0" id="Image7" /> </a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','/cooltext446156370.png',1)"></a> Hello Folks, I have created a graphic using photoshop CS2 that will form the basis of a webpage. I am a little stuck as to how to include rollover buttons. This is the graphic as it is at the moment: http://magicalwonders.com/colingreen/ With my first attempt at using a background graphic for a website I was able to use a repeating tile in the left hand side bar, and insert basic image buttons for navigation. This time though the situation is a little different, as I am not using a solid colour in the side bar, in favour of a graduated colour image. I have yet to slice the graphic, and will create a slice towards the bottom of the graphic that can be used to repeat - so that any overflow text doesn't break the design. What I'm not sure about is, if the main background image for the side bar, and the repeat background tile can occupy the same cell, both as background images? If they can, then adding rollover buttons should not be a problem. If they can, I'm not sure what the code would look like to handle that. If they can't, I'm wondering what other method can be used to include Rollover navigation buttons. I'd be grateful if someone can advise. Many thanks, Myles I'm trying to make an image appear/change in response to a rollover, but the image is not in the same table as the rollover. I'm trying to redesign the header of my website, and have come up with this draft: bottleweb.org/test I want an image to appear in between the "BOTTLEWEB.ORG" text and the buttons. If for example I move my mouse over the 'forum' button, I want an image corresponding to 'forum' to appear in between the buttons and the "BOTTLEWEB.ORG" test. Is this possible? Hi everyone, I am having a basic problem with a header for my site. The header template is a 3 column 4 row table, with various graphic pieces plugged into each cell. On the second row, I have a graphic that is as wide as the 2nd column plus the 3rd column, and I used the colspan command so it should take up both columns. But, there is a goofy gap to the left of it! Can anyone help? The website is www.precisionpythons.com Thank you! JonV Hello, First post! I'm going to start out with a stupid question (because that's what you do when you're a noob). I realise what I am trying to do is very basic, but I cant work out what I should google to achieve it. We have a website - www.rosietheband.com - which is incidentally my first site (the dimensions are a bit messed up atm, I changed a few bits and I haven't quite finished tweaking). At the minute I'm using a really awful flash-based flickr plugin for the photo page, which I'm not enjoying at all. I want to replace it with a really simple gallery consisting of lots of little 100x100 thumbnails (with no spaces) that completely fill the screen (no matter what your screen size is). As I click on them I'd like a larger version to pop-up (I should probably stick a header in so you can get back to the site). I'd rather not use flash. It sounds easy, but the more I think about it, the more I'm dreading the task. It will contain hundreds of images. Generating the thumbs will be no problem, but how will I implement a pop-up for each one? and how will I add new images without editing the code? If anyone could help in any way I'd really appreciate it! (also, any comments on the site itself would be welcome!) All the best, Rosie I'm about to rip my hair out on this one. I'm using Dreamweaver 8. I have navigation that is using image rollovers to swap. My images that are needed for the rollover to work are in my "assets" folder in the "root" directory. However, when I create the actual html page off the template it is looking for the image in "templates/assets" and therefore does not find the image to swap. I have a number of different navigation buttons and I inserted them all the exact same way. This is the only one that is having this issue, the rest work properly. This is the code that resides on the templates page. Code: <p class="navimage"> <a href="../logset.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Log & Grate Set','','..assets/menu/log_over.jpg'',1)"><img src="../assets/menu/log_default.jpg" alt="Log & Grate Set" name="Log & Grate Set" width="158" height="34" border="0" id="Log & Grate Set" /></a></p> Notice the Set','','..assets/menu/log_over.jpg. This is the code that is produced when you create an html page from the template. Code: <a href="logset.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Log & Grate Set',Templates/'','..assets/menu/log_over.jpg'',1 For some reason it is adding the directory templates, and therefore does not find the image. Does anyone know how I can fix this? Thanks, braves07 I'm doing some homework for my basic html class and i put the code in the w3 validate and it keep's putting errors on my images what am i doing wrong? Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Tyler East, ITSE 1411 Lab Project 1, Tutorial 1 Case 4, Due 02/09/2011</title> <!-- Body System's Home Gym Equipment Tyler East 2/4/2011 --> </head> <body> <img src="logo.jpg" alt="Body Systems" /> <hr/> <h2>Body Systems LSM400 Linear Smith Machine</h2> <IMG src="smith.jpg" ALT="LSM4000" /> <h2>Overview</h2> <p>Linear Smith Machines are the ultimate in weight machines and the LSM400 leads the field. Designed for both serious fitness users and beginners, the LSM400's vertical design provides all of the safety and control associated with Smith Machines, while still allowing for the effective use of gravity for effective resistance. You don't even need a workout partner. Lock points can be set to prevent the bar from movement outside of your body's natural range of motion.</p> <p>You can tailor the LSM400 to meet you specific workout needs. Start with the basic package of the Smith Machine rack and, as your needs grow, add a lat/row, pec dec, plate tree, dip, and accessory organizer. Accessories are easy to insert and remove, allowing you to continue your workout without delay. The LSM400 works with all standard Olympic weight plates</p> <p>The LSM400 is compact with all components place one side of the unit for easy access. This makes the LSM400 perfect for people who want a quality home gym, but do not have a lot of space. Place the LSM400 against a wall and you're ready to go!</p> <p><b>Features</b> Smooth Smith Action: The bar (rated at 800 lb. capacity) slides on Teflon bushings alongside solid steel guide rods. Smooth motion is key to successful workouts, as the target muscles are utilized to their full potential with each repetition.</p> <p><b>Proper Angle:</b> The bar travels along a 7 degree path from vertical. Studies have shown that this is the proper lifting angle to increase your comfort and prevent injury.</p> <p><b>Safety:</b> The LSM400 has 20 lock-out points for a safe, solid stop at any point in your workout routine.</p> <p><b>Rugged:</b> Constructed with heavy 12 gauge steel and 7 gauge reinforcing plate. This is a unit built to last.</p> <p><b>Warranty:</b> Every part of the LSM400 has a lifetime guarantee. We will replace or repair anything that goes wrong.</p> <b>Dimensions</b> <ul> <li>Width: 85"</li> <li>Height: 82"</li> <li>Depth: 72"</li> </ul> <b>Optional Attachments</b> <ul> <li>Selectorized Lat/Row station (Part: MA831-4)</li> <li>Pec Dec station (Part: MA218-6)</li> <li>Dip station (Part: MA105-3)</li> <li>Plate tree (Part: MA488-0)</li> <li>Accessory organizer (MA212-1)</li> <li>Workout DVD (MA051-1)</li> <li>Workout poster (MA055-3)</li> </ul> <address> Body Systems 401 Commercial Drive Eaton, TX 87015 (800) 555-2811 </address> </body> </html> I have the following script on my webpage. <script type="text/javascript" src=http://links.christiansunite.com/blessing.cgi?></script> When I try to get my page validated I get this warning that doesn't make sense to me. Warning: Line 55, column 90: end tag for element "SCRIPT" which is not open . ...tiansunite.com/blessing.cgi?></script> How can I fix this? At the right of this page I added a news scrolling in flash, when I open this website in Safari or Firefox there is NO PROBLEM! But when I open it in Internet Explorer I get a weird error "Bewerking Afgebroken" It is Dutch and don't know what it will mean in English, After I get this error the page stop loading and I only see the topbar of my website. HELP Website: http://liv9.net/television/index.php (the flash script is a rss flash script, so the news is from another website) OK so I am grabbing this code off of a local news site (WRAL) and when I embed into a myspace page, only portions of the script are showing up, not the video. So there is something wrong with the code itself i'm sure, I just don't know what. Here is the code. Do you guys see any errors he Quote: <script src="http://www.wral.com/entertainment/video/2820107/?version=embedded" type="text/javascript"></script><script type="text/javascript"> width=330; height=280; wral_insert_video_player_2820107(width,height); </script> Hello All, So, I have a website with a floating cart and it loads fine and works almost flawlessly lol. However, when a person has a bunch of items in their cart, and they want to minimize it for the rest of their browsing experience, every time a new page loads, or a refresh happens, the floating cart un-minimizes and expands out fully again displaying all the items. This can become very annoying during the shopping experience when you have a bunch of items loading and just taking up space in the browser. Therefore, I am wondering if their is some html or script that would save the minimizing in the floating cart, and carry it over to the next page, and the rest of the browsing on site? Thank you for any suggestions/help. I am new to HTML and script writing, but I am eager to learn. Hopefully in the future, I won't be paying for little changes like this every time I need one. |