#1 (permalink)  
Old 08-13-2008, 12:34 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Question Whole Cell Linked To Main Frame

I finally figured out how to get a whole cell to become a link, but cannot seem to figure out how to make the link to a different frame. This is the code that currently works but only links to the same frame:

Code:
<tr bgcolor="" onmouseover="this.style.backgroundColor='#0099FF'" onMouseOut="this.style.backgroundColor=''" onClick="document.location.href='/home.html' target="mainFrame";" style="cursor:pointer;cursor:hand">

Thanks in advance, any help would be greatly appreciated.
Reply With Quote

  #2 (permalink)  
Old 08-13-2008, 08:27 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,438
Doing it that way, you will need to replace "document" with the name of your frame. For instance, if your frame is named "myframe", you would use "myframe.location.href" instead of "document.location.href" (it's possible you might have to use myframe.document.location.href - I can't remember for sure, anymore).
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #3 (permalink)  
Old 08-13-2008, 08:57 PM
Registered User
 
Join Date: Aug 2008
Posts: 2
Didn't work...

I tried both ways and nither are working.

Code:
 <tr bgcolor="" onmouseover="this.style.backgroundColor='#0099FF'" onMouseOut="this.style.backgroundColor=''" onClick="mainFrame.location.href='home.html'";" style="cursor:pointer;cursor:hand">
Code:
<tr bgcolor="" onmouseover="this.style.backgroundColor='#0099FF'" onMouseOut="this.style.backgroundColor=''" onClick="mainFrame.document.location.href='home.html'";" style="cursor:pointer;cursor:hand">
Testing site in IE7 it is giving me a scripting error saying mainFrame is undefined.


Thanks for fast reply, by the way.

Last edited by charlie2163; 08-13-2008 at 09:00 PM.
Reply With Quote
  #4 (permalink)  
Old 08-14-2008, 08:48 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,438
You've got an extra double-quote mark and a semi-colon where they don't belong in your code. I think that's the only thing stopping it from working.

Following is some tested, working code to show you an example:
Code:
<table width="200" border="1">
  <tr onclick="myframe.location.href='http://www.google.com/'">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

<iframe name="myframe" src="http://www.yahoo.com/"></iframe>
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver MX 2004 Flash button link > Main Frame System366 Graphics and Flash 0 12-16-2007 12:11 AM
Apply Css to Frame hhk999 Programming and Scripting 0 09-03-2007 07:29 AM
Frame document in Dreamweaver lala.anderson Programming and Scripting 0 05-15-2007 05:44 AM
write something on the parent frame's textbox without reloading the parent frame? gilgalbiblewhee Programming and Scripting 3 03-13-2006 07:07 AM
Reload Frame Page scott3415 Programming and Scripting 1 05-03-2005 08:55 AM


All times are GMT -5. The time now is 02:37 AM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter