html - How to fetch URL of newly opened tab through javaScript -
i trying fetch url of new opened tab.
i converting google graph api image using grchartimg library , take image , embed pdf. there library function - grchartimg.showimage('chart_div').
when call function through onclick event browser opens new tab has long base64 encoded url , contains image of graph. want fetch url of page.
i have tried window.location, location.href not getting success. code shown below..
<div id="chart_div" style="width: 900px; height: 500px;"></div> <a href="javascript:grchartimg.showimage('chart_div');">showimage</a> here 'chart_div' div id of google graph.
no cant it. can use (window.location.href) or (window.parent.location.href) fetech url of current window , parent window respectively.
Comments
Post a Comment