ShyamSundarB
asked on
Opening Hyperlinks inside Excel WebAccess webpart in the Same Window
Hello Experts,
Here is the Scenario!!!
I have a SharePoint page that has an Excel Webaccess webpart which is rendering an excel workbook.This excel workbook has hyperlink values in it.
When i click the hyperlink it is opening in new window, my requirement is to open the link in the same window.
Since the environement is SharePoint 2010, the webpart is rendered in nested Divs rather than iframes(use to be in 2007).I tried changing the target for the <a> tag using javascript and the target frame got changed, but the link in not opening in new window.
Note : I'm using SP2010 environment.
Appreciate your thoughts/inputs..
Here is the Scenario!!!
I have a SharePoint page that has an Excel Webaccess webpart which is rendering an excel workbook.This excel workbook has hyperlink values in it.
When i click the hyperlink it is opening in new window, my requirement is to open the link in the same window.
Since the environement is SharePoint 2010, the webpart is rendered in nested Divs rather than iframes(use to be in 2007).I tried changing the target for the <a> tag using javascript and the target frame got changed, but the link in not opening in new window.
Note : I'm using SP2010 environment.
Appreciate your thoughts/inputs..
ASKER
@ Gary,
The link just explains how to hyperlink a column in Excel. I have all those stuffs implemented, but when i click the hyperlinked data it is opening in new window; i want to open it in same window or say i have an iframe in the page and when i click the link,it should be opened within the iframe.
hope it is clear!!!
The link just explains how to hyperlink a column in Excel. I have all those stuffs implemented, but when i click the hyperlinked data it is opening in new window; i want to open it in same window or say i have an iframe in the page and when i click the link,it should be opened within the iframe.
hope it is clear!!!
Did you see this similar question?
https://www.experts-exchange.com/questions/25650453/Excel-Services-hyperlink-redirect-to-same-Window.html
https://www.experts-exchange.com/questions/25650453/Excel-Services-hyperlink-redirect-to-same-Window.html
ASKER
Yes i did..
In 2010 environment, the Excel webaccess Webpart is rendered in nested Divs and not in iframes. But still followed with the suggested approach, was able to change the taget window using javascript.
To my surprise even after changing the target window, the link is opened in new window instead of opening in specified window frame.
Below is code i used to change the target window.
<script language="javascript" type="text/javascript">
$( document ).ready(function() {
$(".ewr-sheetcontainer").m ouseover(f unction(){
$(".ewr-sheetcontainer a").each(function(){
$(this).attr('target','Hea tMapV2_Fra me');
});
});
});</script>
<div><iframe name="HeatMapV2_Frame" id="HeatMapV2_Frame"></ifr ame></div>
In 2010 environment, the Excel webaccess Webpart is rendered in nested Divs and not in iframes. But still followed with the suggested approach, was able to change the taget window using javascript.
To my surprise even after changing the target window, the link is opened in new window instead of opening in specified window frame.
Below is code i used to change the target window.
<script language="javascript" type="text/javascript">
$( document ).ready(function() {
$(".ewr-sheetcontainer").m
$(".ewr-sheetcontainer a").each(function(){
$(this).attr('target','Hea
});
});
});</script>
<div><iframe name="HeatMapV2_Frame" id="HeatMapV2_Frame"></ifr
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So it's working?
ASKER
yes it's working now!!!
ASKER
The code worked for me and it is the way we need to handle the EWA webpart in SP2010.
http://office.microsoft.com/en-001/sharepoint-server-help/using-hyperlinks-in-excel-services-HA010173679.aspx
Gary