Can Anyone tell me the difference between window.location.href and top.location.href ?
And also where to use which one.
And which
top refers to the window object which contains all the current frames ( father of the rest of the windows ). window is the current window.
http://www.howtocreate.co.uk/tutorials/javascript/browserinspecific
so top.location.href can contain the "master" page link containing all the frames, while window.location.href just contains the "current" page link.