Javascript onload after redirect -
in javascript code loading page, , perform functions. tried use solutions window.onload
, after html (blank page js) loads, need function perform after page reffering loaded. using code:
this.document.location.href = myurl;
and after loads, call function. there way so? thanks
edit:
i can not edit target page source code.
when change value of document.location.href
, doing redirect.
you can either whatever want within loaded page or if don't have cross domain issues, xhr of page you're wanting load dynamically, query body, replace content of current body , replace head contents i.e. style, title , scripts etc. execute script want.
extra note: quite tricky thing do, i've done few times before - , proven quite problematic due fact don't parsed document object can query simply, receive huge string. 1 hack i've thought of using loading within iframe allowing easy querying documented - reading here
Comments
Post a Comment