...

View Full Version : how to determine the URL for Excel file?



oem7110
12-24-2011, 01:11 AM
Referring to following link, I would like to determine the link for "In-Depth.xls", based on following coding, I find related information for Excel.png, does anyone have any suggestions on how to determine the URL for Excel file?

Thanks in advance for any suggestions

http://fx.aastocks.com/en/forex/market/dbindepth.aspx?country=66970&indicator=47

<img src="../../images/common/Excel.png" id="cp_imgExcel" class="btn" onclick="window.location.href=&#39;dbindepth.aspx?country=66970&amp;startdate=2010/12/24&amp;enddate=2011/12/24&amp;indicator=47&amp;excel=1&#39;"/>

chump2877
12-24-2011, 02:48 AM
http://fx.aastocks.com/en/forex/market/dbindepth.aspx?country=66970&startdate=2010/12/24&enddate=2011/12/24&indicator=47&excel=1

If you are looking to access the link programmatically, just access the onclick event handler, i.e.:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<title>TITLE</title>
</head>
<body>

<img src="../../images/common/Excel.png" id="cp_imgExcel" class="btn" onclick="window.location.href='dbindepth.aspx?country=66970&amp;startdate=2010/12/24&amp;enddate=2011/12/24&amp;indicator=47&amp;excel=1'"/>

<script type="text/javascript">
var onclickSource = document.getElementById('cp_imgExcel').getAttribute('onclick').replace(/^((window\.location\.href=')(.+?)('))$/, "$3");
alert(onclickSource);
</script>

</body>
</html>

oem7110
12-24-2011, 03:47 AM
Thanks you very much for suggestions



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum