A very simple question ref Array vars and HTML <TD>!!

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 9th, 2008, 11:29
New Member
Join Date: Mar 2008
Location: UK
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 9th, 2008, 15:31
Reputable Member
Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 15th, 2008, 13:09
Junior Member
Join Date: Oct 2007
Location: Louth
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
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
__________________
Your rss reader for fresh news headlines.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 08:10.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42