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!

CSS Question 1

Status
Not open for further replies.

dakoz

Programmer
Feb 2, 2002
74
hi all,

i have the following <td> in a table

<TD borderColor=&quot;FFFFFF&quot;><IMG SRC=&quot;./images/db.gif&quot; width=&quot;14&quot; height=&quot;13&quot;></TD>
<TD bgcolor=&quot;#FFFFFF&quot; onmouseover=&quot;this.style.backgroundColor='#D6D6D6'; this.style.borderColor='#4E636B';&quot;
style=&quot;BORDER-RIGHT: #eeeeee 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #eeeeee 1px solid; PADDING-LEFT: 5px; FONT: 10px Verdana; BORDER-LEFT: #eeeeee 1px solid; WIDTH: 100%; CURSOR: hand; BORDER-BOTTOM: #eeeeee 1px solid; TEXT-ALIGN: left&quot;
onClick=&quot;parent.main.location.href='blank.html'&quot;onmouseout=&quot;this.style.backgroundColor='#fefefe';this.style.borderColor='#eeeeee';&quot;>SOFTWARE</TD>


i have it in frames! i want when someone clicks on this SOFTWARE link to open this url in a new window.. i tried several stuff on the

onClick=&quot;parent.main.location.href='blank.html'

command but nothing seems to work...

can anyone tell me what is the correct syntax?

Thanx in advance
 
Hi Dakoz, ok you're problem is that a)you have no link and b) you're syntax was wrong.
Try this:

<TD borderColor=&quot;FFFFFF&quot;>
<IMG SRC=&quot;./images/db.gif&quot; width=&quot;14&quot; height=&quot;13&quot;>
</TD>
<TD bgcolor=&quot;#FFFFFF&quot;
style=&quot;BORDER: solid 1px #eeeeee; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT: 10px Verdana; WIDTH: 100%; TEXT-ALIGN: left&quot;
onmouseover=&quot;this.style.backgroundColor='#D6D6D6'; this.style.borderColor='#4E636B'&quot;;
&quot;onmouseout=&quot;this.style.backgroundColor='#fefefe';this.style.borderColor='#eeeeee'&quot;;>
<a href=&quot;blank.html&quot; target=&quot;_top&quot;>SOFTWARE</a>
</TD>

Pete
 
i want the entire <TD> to be active not just the words SOFTWARE!
 
Sorry didn't realise you wanted it all to open a window.

Try this insted, i've made it up to a full page for the example. Note the bold text:

<html>
<head>

<script language=javascript>
function openwindow()
{
window.open(&quot;blank.html&quot;)
}
</script>

</head>
<body>
<table><tr>
<TD borderColor=&quot;FFFFFF&quot;>
<IMG SRC=&quot;./images/db.gif&quot; width=&quot;14&quot; height=&quot;13&quot;>
</TD>
<TD bgcolor=&quot;#FFFFFF&quot; onclick=&quot;openwindow()&quot;
style=&quot;BORDER: solid 1px #eeeeee; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT: 10px Verdana; WIDTH: 100%; TEXT-ALIGN: left&quot;
onmouseover=&quot;this.style.backgroundColor='#D6D6D6'; this.style.borderColor='#4E636B'&quot;;
&quot;onmouseout=&quot;this.style.backgroundColor='#fefefe';this.style.borderColor='#eeeeee'&quot;;>
SOFTWARE
</TD>

</tr></table>
</body>
</html>
 
if i have multiple links? i cant reference all my links into blank.html
 
Sorry i'm only just learning JavaScript, if i figure it out i'll post it. Maybe try the javascript forum? I'm sure someone can give you a quick answer there. At least you're halfway there now :O)

Pete
 
Surprised myself!

Try this:

<html>
<head>

<script language=javascript>
function openwindow(url)
{
var link=url
window.open(link)
}
</script>

</head>
<body>
<table><tr>
<TD borderColor=&quot;FFFFFF&quot;>
<IMG SRC=&quot;./images/db.gif&quot; width=&quot;14&quot; height=&quot;13&quot;>
</TD>
<TD bgcolor=&quot;#FFFFFF&quot; onclick=&quot;openwindow('blank.html')&quot;
style=&quot;BORDER: solid 1px #eeeeee; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT: 10px Verdana; WIDTH: 100%; TEXT-ALIGN: left&quot;
onmouseover=&quot;this.style.backgroundColor='#D6D6D6'; this.style.borderColor='#4E636B'&quot;;
&quot;onmouseout=&quot;this.style.backgroundColor='#fefefe';this.style.borderColor='#eeeeee'&quot;;>
SOFTWARE
</TD>
</tr>
<tr>
<TD borderColor=&quot;FFFFFF&quot;>
<IMG SRC=&quot;./images/db.gif&quot; width=&quot;14&quot; height=&quot;13&quot;>
</TD>
<TD bgcolor=&quot;#FFFFFF&quot; onclick=&quot;openwindow('blank2.html')&quot;
style=&quot;BORDER: solid 1px #eeeeee; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT: 10px Verdana; WIDTH: 100%; TEXT-ALIGN: left&quot;
onmouseover=&quot;this.style.backgroundColor='#D6D6D6'; this.style.borderColor='#4E636B'&quot;;
&quot;onmouseout=&quot;this.style.backgroundColor='#fefefe';this.style.borderColor='#eeeeee'&quot;;>
LINKS
</TD>
</tr>
</table>
</body>
</html>
 
THIS IS IT!~!! Thanx a lot man!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top