1 | <a href="" onClick="top.seturl(this,'item27.html')" onMouseOver="window.status='this is a test of onMouseOver'; return true">Exciting Item 27</a> |
2 | This is a very typical use of onClick in a hyperlink |
3 | Keyword this refers to current link object of type location |
4 | Set href to anything, even "", but do not omit otherwise won't be a link Ñ will be an anchor instead! |
5 | Set href and target frame in onClick event handler: |
6 | function seturl(linkname, fileurl) { |
7 | linkname.target = "top.mainframe"; |
8 | linkname.href = fileurl); } |
9 | Put seturl in top frameset document. The <a> link is in a frame where onClick allows seturl to load required document into mainframe, the main display frame |