<a href="" onClick="top.seturl(this,'item27.html')" onMouseOver="window.status='this is a test of onMouseOver'; return true">Exciting Item 27</a> |
This is a very typical use of onClick in a hyperlink |
Keyword this refers to current link object of type location |
Set href to anything, even "", but do not omit otherwise won't be a link Ñ will be an anchor instead! |
Set href and target frame in onClick event handler: |
function seturl(linkname, fileurl) { |
linkname.target = "top.mainframe"; |
linkname.href = fileurl); } |
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 |