Cell/td on mouse click event using ASP

C

Carl Gilbert

Hi

I have a basic page for which I have included some of the code for at the
end of this message. It may not run correctly as I have cropped out a lot
of code.

I am trying to handle the click event for a cell. From the code you should
be able to see that I am handling the mouse over event and would like to
link to another page via the cell click.

I addition, but not too important at the moment, I would like to pass a
string or two across to the called page. For example link to the next page
and within that page identify which cell was clicked and possible pass a
string for the image used in the clicked cell.

Any help on either subject would be greatly appreciated.

Kind regards, Carl Gilbert.



<HTML>
<HEAD>
<TITLE>Categories</TITLE>
<META name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<META name="CODE_LANGUAGE" content="Visual Basic 7.0">
<META name="vs_defaultClientScript" content="JavaScript">
<META name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">


<STYLE type="text/css">
.over { background-color:silver; }
.out { background-color:white; }
</STYLE>

</HEAD>
<BODY ms_positioning="FlowLayout">
<FORM id="Categories" method="post" runat="server" action="designs.asp">
<TABLE border="0" cellpadding="0" cellspacing="0" id="Table3">
<TR><TD height="37" style="border:3 solid black;" valign="top"
onmouseover="this.className='over'" onmouseout="this.className='out'">
<A href="designs.asp">Designs</A></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
 
A

Adrienne

Gazing into my crystal ball I observed "Carl Gilbert"
Hi

I have a basic page for which I have included some of the code for at
the end of this message. It may not run correctly as I have cropped
out a lot of code.

I am trying to handle the click event for a cell. From the code you
should be able to see that I am handling the mouse over event and would
like to link to another page via the cell click.

I addition, but not too important at the moment, I would like to pass a
string or two across to the called page. For example link to the next
page and within that page identify which cell was clicked and possible
pass a string for the image used in the clicked cell.

Any help on either subject would be greatly appreciated.

Kind regards, Carl Gilbert.



<HTML>
<HEAD>
<TITLE>Categories</TITLE>
<META name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<META name="CODE_LANGUAGE" content="Visual Basic 7.0">
<META name="vs_defaultClientScript" content="JavaScript">
<META name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">


<STYLE type="text/css">
.over { background-color:silver; }
.out { background-color:white; }
</STYLE>

</HEAD>
<BODY ms_positioning="FlowLayout">
<FORM id="Categories" method="post" runat="server"
action="designs.asp">
<TABLE border="0" cellpadding="0" cellspacing="0" id="Table3">
<TR><TD height="37" style="border:3 solid black;" valign="top"
onmouseover="this.className='over'" onmouseout="this.className='out'">
<A href="designs.asp">Designs</A></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>

Let me guess, it's a menu isn't it? There is no reason to use a table for
a menu, unless it's a restaurant menu with a list of dishes and prices. By
the way, there is no attribute ms_positioning for the BODY element. There
is also no attribute runat for the FORM element. These attributes probably
only work to IE browser, so if you depend on them, you might have problems
for the 15% or so people who do not use that browser.

You should be using an unordered list, and just plain CSS for this. Have a
look at the source of http://www.arbpen.com/usenet/twocolumn.htm

This is what you're really looking at:

<!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">
<head>
<title>Categories</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
body {background-color: #fff; color: #000;}
a.menu {display:block; }
a.menu:hover {background-color: silver}
ul.menu {list-style-type:none}
</style>
<body>
<ul class="menu">
<li><a href="designs.asp?color=red">Red Designs</li>
<li><a href="designs.asp?color=blue">Blue Designs</li>
</ul>
</body>
 
M

Mabden

Adrienne said:
Gazing into my crystal ball I observed "Carl Gilbert"
<[email protected]> writing in

These attributes probably
only work to IE browser, so if you depend on them, you might have problems
for the 15% or so people who do not use that browser.

Isn't 15% a little high? I guess the Linux propaganda machine is running
ahead of itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top