Okay, i've been doing java for a couple of years now, but just started javascript. What I need is to have a mouseover event put an image in one cell of a table and text in another cell. Any help would be greatly appreciated. Thanks!
Okay, i've been doing java for a couple of years now, but just started javascript. What I need is to have a mouseover event put an image in one cell of a table and text in another cell. Any help would be greatly appreciated. Thanks!
One question: Eclipse or NetBeans?HTML Code:<table onmouseover="document.getElementById('addImage').innerHTML = '<img src=\'image.png\'/>'; document.getElementById('addText').innerHTML = '<p>Text goes here</p>';"> <tr> <td id="addImage"></td> <td id="addText"></td> </tr> </table>![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
why can i not get this working? I think i'm just an idiot... =(
If i put it between the <script> it doesn't make the table but if i put it outside the <script> it doesn't do the mouse over... sorry i'm such a noob with this.
Last edited by Eclyps19; 10-15-2005 at 01:19 PM.
Hm, what's your error?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
wow you're quick... no error just look at the previous post
Don't put it in <script> tags, just add the above onmouseover event to whatever you want to mouseover, and set the IDs of the two cells for the content to appear in as above.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Code:<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p><img src="file:///C|/Documents%20and%20Settings/Renee/My%20Documents/Websites/slickandbubbas.jpg" width="89" height="48" onmouseover="document.getElementById('addImage').innerHTML = '<img src=\'image.png\'/>'; document.getElementById('addText').innerHTML = ' <p>Text goes here</p>';"></p> <table width="472" height="128" border="1" > <tr> <td id="addImage"></td> <td id="addText"></td> </tr> </table> </body> </html>
What i've got is just a picture at the top, i want the mouseover on that, and then the 2 cells at the bottom to display something.
Take the newline away from before the paragraph.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
wow... something so simple... thanks a lot =)
Does this script work with firefox and all other browsers. I'm havin a hard time getting it to work. I'm slightly rookie noob. go to:
http://www.citynightslimousine.com/casanuestra.html
http://www.citynightslimousine.com/dutchhenry.html
Hopefuly by looking at those 2 pages you'll understand what i'm trying to accomplish by using script like this instead of having seperate html files for each winery info and the refresh blink of the seperate html files can be annoying too. I'm using dreamweaver, and a noobie at it. I'm a lil over my head as I'm sure you'll notice what I've been producing as a hobby.
anyone help....![]()
Bookmarks