Click to See Complete Forum and Search --> : Targets in JS - need more help
Jack73
12-05-2002, 10:27 AM
I want a link in left navigation to display a new frame rather than replace the main page. In HTML I have it as TARGET="useCont"
What would I need to do in the following in order for it to do this in js?
onclick="window.top.location.href='http://www.intrawide.nbsnet.co.uk/livepub/secure/Finance/SID/Default.htm'";
Thank you.
AdamGundry
12-05-2002, 02:41 PM
You can specify the frame name as a property of window.top, giving the following:
onclick="window.top.useCont.location.href='http://www.intrawide.nbsnet.co.uk/livepub/secure/Finance/SID/Default.htm'";
Adam
Jack73
12-06-2002, 03:25 AM
Hi
Yes I thought that would be the case but when I tried it it said there was an error so I have checked my script and it looks ok. Is there anything you can see that I may be doing wrong?
<td class="mainMenu" onmouseover="fadeImg2(9)" onmouseout="fadeImgend2(9)" onclick="window.top.useCont.location.href='http://www.intrawide.nbsnet.co.uk/livepub/secure/Finance/SID/Default.htm'"; style="border:1px solid gray;background-color:#000066;width:150;text-align:left"><font color="white" size="1">SID Newsletter (SID Employees Only)</td>
Thanks
Jackie