View Single Post
  #1 (permalink)  
Old 06-30-03, 03:05 PM
Greg's Avatar
Greg Greg is offline
iNET Graphics Guru
 
Join Date: May 2003
Location: Kansas City
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Question Targeting links using javascript

I have an iFrame that contains a listing of records from a database. Instead of making the text in each row a link (using a link tag), I am using javascript to make the whole row a link. So, when you double-click the row it'll open a particular link.

----------------
<tr bgcolor="CCCFD6"
onmouseover="this.style.backgroundColor='#DCDEF1'; this.style.cursor = 'hand';"
onmouseout="this.style.backgroundColor='#CCCFD6';"
ondblclick="location.href='#';">
----------------

Right now all the links open in the iFrame, when I want them to open in the main window. I have done a lot of research and I can't find the right code to make the links not open in the iFrame. If I used regular <a> tag it would be simple to set the target="_top". What I have tried is: location.target='_top';, but it doesn't work.

Any input would be a great help... thanks.
__________________
Greg Pabst
HotScripts.com Graphics Guru
Reply With Quote