This is a discussion on "A very simple question ref Array vars and HTML <TD>!!" within the JavaScript Forum section. This forum, and the thread "A very simple question ref Array vars and HTML <TD>!! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
A very simple question ref Array vars and HTML <TD>!!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
A very simple question ref Array vars and HTML <TD>!!
I am working on a very simple program that when the user hovers over a link it searches an array to replace a TD value with that of the array.
<body> <table width="300"> <tr> <td> <a href="#" onmouseover="subMenu(0);">Link A</a> </td> <td> <a href="#" onmouseover="subMenu(1);">Link B</a> </td> <td> <a href="#" onmouseover="subMenu(2);">Link C</a> </td> <td> <script type="text/javascript"> function subMenu(funcNum){ newFuncNum=new Array("<a href=#>Link A</a>","<a href=#>Link B</a>","<a href=#>Link C</a>"); return(newFuncNum[funcNum]); } </script> </td> </tr> </table> I don't know how to get the program to write the array's value into the HTML thus creating a different link eveytime the user hovers over the main links. Sorry if this doesn't make sense!! I tried to write this in a way to make it as understandable as posible but have not really made a good job of it! As you can tell I'm knida new to this so any help would be appreciated Peth |
|
|
|
|||
|
Re: A very simple question ref Array vars and HTML <TD>!!
Use onmouseover, onmouseout, and getElementById("xyz").href="";
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
|
|
|||
|
Re: A very simple question ref Array vars and HTML <TD>!!
getElementById("xyz").InnerHtml also can solve your problem i think. You can found informations for innerHTML at google
Regards |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hopefully a simple question | newoptical | Hosting & Domains | 9 | Sep 21st, 2007 22:02 |
| simple question | Daniel | Web Page Design | 29 | Feb 6th, 2007 17:23 |
| Simple CSS Question | welshie | Web Page Design | 9 | Jan 31st, 2007 12:22 |
| a simple question (I think) | Colm Osiris | Web Page Design | 2 | Feb 5th, 2006 09:17 |
| A simple Question... | Lizard- | Classic ASP | 11 | Aug 11th, 2004 08:45 |