View Full Version : Placing a called function in a seperate cell

Jun 10th, 2008, 11:51 PM
I have created functions which will be called with a mouseover event. The thing I need help is what code is required to place that called function into a seperate cell of a table.

Thanks a lot for your help

Jun 11th, 2008, 12:31 AM
Can't you attatch onclick to the table cell like <td onclick= your unction()>your content </td>

Jun 11th, 2008, 07:03 PM
So what your saying is place the onmouseover event that is calling the function, and place that right into the <td> tag?


//main navigation bar content w/onmouseover events
<td onmouseover="navbar(menu1)">
//sub navigation bar content that occurs from mouseover event in main nav bar

I hope that is what your meaning
Thanks a lot for the help

Jun 11th, 2008, 07:39 PM
yes but what does your function do? Does it affect the cell the function is in?

Jun 11th, 2008, 07:56 PM
What the function does is call a series of buttons that lay horizontally just below the main navigation bar in a seperate cell. It may help if you see the function code itself

function educationnav ( ) {
str = '<a href=""><img src="alliedwhite.src" onmouseover="alliedblue.src" onmouseout="alliedwhite.src" alt="Allied Schools" hspace="1" vspace="1">';
str += '<a href=""><img src="dvdwhite.src" onmouseover="dvdblue.src" onmouseout="dvdwhite.src" alt="DVDs" hspace="1" vspace="1">';
str += '<a href=""><img src="bookwhite.src" onmouseover="bookblue.src" onmouseout="bookwhite.src" alt="Books" hspace="1" vspace="1">';

I realize that the function is calling a bunch of HTML but I couldnt think of an easier way to create buttons w/mouseover events.
So basically its just a horizontal pull down menu is all im creating

Thanks a lot for the help

Jun 11th, 2008, 11:28 PM
Something else I am having trouble figuring out is how to classify three seperate functions to be placed in the same cell and only call that particular function when its mouseover event occurs.

I appreciate any help in the matter

Jun 12th, 2008, 02:58 PM
well what does your function do. also you can call a functions with the same event or another one.

like one function mouseover, another mouseclick or mouseover" function();function() "

I think you might want to look that up though