Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape/IE <a>

Status
Not open for further replies.

rico14d

Programmer
Apr 8, 2002
135
GB
The code below works fine in IE but in Netscape the link does not work at all.

Is there something missing or is there a way to make the link work for the whole row in Netscape?

<table width=80% align=center>

<a href=&quot;fred.htm&quot;>
<tr>
<td>Text1</td>
<td>Text2</td>
</tr>
</a>

<tr>
<a href=&quot;fred.htm&quot;>
<td>Text1</td>
<td>Text2</td>
</a>
</tr>


</table>

Thanks,
Rich.
 
your code is actually invalid, the reason it works in IE is that IE is so forgiving and it can also handle the event bubbling that is required in your example. Netscape (4.x) however has a hard time dealing with valid HTML let alone invalid HTML.
 
That wasnt the answer I wanted, but thanks anyway.
Rich.
 
Hi,

You can't by strict rules of HTML have a table row with A href in it.

James
 
Ive solved it now, instead of having <a> i just used

<tr onclick=&quot;do_link()&quot;>

and used the javascript function to replace the page.
Thanks anyway.
 
In fact rico14d had put his link in the table before having <tr> to begin the first row. A <tr> tag is needed for each row of a table, followed by however many <td> tags are needed to make the required number of cells in that row. An ending </tr> tag should be used too.

Any links should be placed within <td> tags to be picked up by browsers consistently.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top