Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-24-2011, 01:11 AM   PM User | #1
oem7110
New Coder

 
Join Date: Dec 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
oem7110 is an unknown quantity at this point
how to determine the URL for Excel file?

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/mark...0&indicator=47

<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'"/>
oem7110 is offline   Reply With Quote
Old 12-24-2011, 02:48 AM   PM User | #2
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
http://fx.aastocks.com/en/forex/mark...tor=47&excel=1

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

Code:
<!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>
__________________
Regards, R.J.

Last edited by chump2877; 12-24-2011 at 03:14 AM..
chump2877 is offline   Reply With Quote
Users who have thanked chump2877 for this post:
oem7110 (12-24-2011)
Old 12-24-2011, 03:47 AM   PM User | #3
oem7110
New Coder

 
Join Date: Dec 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
oem7110 is an unknown quantity at this point
Thanks you very much for suggestions
oem7110 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:30 PM.


Advertisement
Log in to turn off these ads.