
Michael O'Flaherty
Top achievements
Rank 2
Michael O'Flaherty
asked on 28 Jan 2013, 06:56 PM
Hi!
We have defined this button:
...which results in this HTML:
In IE, we would like the user to be able to right-click on this hyperlink and select 'Open In New Tab.' Unfortunately, this hyperlink does not work like a regular hyperlink. Why? And how can we make this behave?
Thanks!
Michael
We have defined this button:
<
telerik:RadButton
ID
=
"radButtonNewPlacement"
Text
=
"New Placement"
ToolTip
=
"#"
ButtonType
=
"LinkButton"
EnableEmbeddedSkins
=
"false"
EnableEmbeddedBaseStylesheet
=
"false"
runat
=
"server"
CssClass
=
"radButtonNoImage"
OnClick
=
"radButtonNewPlacement_Click"
NavigateUrl
=
"http://www.bing.com"
/>
...which results in this HTML:
<
a
id
=
"radButtonNewPlacement"
title
=
"#"
class
=
"RadButton RadButton_Office2010Blue rbLinkButton radButtonNoImage"
href
=
"http://www.bing.com"
><
span
class
=
"rbText"
>New Placement</
span
><
input
id
=
"radButtonNewPlacement_ClientState"
name
=
"radButtonNewPlacement_ClientState"
type
=
"hidden"
/></
a
>
In IE, we would like the user to be able to right-click on this hyperlink and select 'Open In New Tab.' Unfortunately, this hyperlink does not work like a regular hyperlink. Why? And how can we make this behave?
Thanks!
Michael
5 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 29 Jan 2013, 05:27 AM
Hi Michael
I tried the exact scenario with the latest version of Telerik controls in IE9 and it worked as expected.
Please check the screenshot as well.
Thanks,
Princy.
I tried the exact scenario with the latest version of Telerik controls in IE9 and it worked as expected.
Please check the screenshot as well.
Thanks,
Princy.
0

Michael O'Flaherty
Top achievements
Rank 2
answered on 29 Jan 2013, 01:44 PM
Attached is the right-click menu from the code below. Note, there are hyperlink columns in a RadGrid on the page that do support the right-click (but I had to redact due to sensitive information.)
0

Michael O'Flaherty
Top achievements
Rank 2
answered on 29 Jan 2013, 01:46 PM
We are using IE9 as well by the way...
0
Hello Michael,
As you have already noticed - RadButton is rendered as an anchor with a span and a hidden input inside of it. Most browsers like - Mozilla, Chrome and Opera are triggering the contextmenu on the anchor element (bubble effect) when the click event is triggered, while Internet Explorer is triggering it on the span element. This is a browser behaviour, and we do not have much control on it.
Regards,
Danail Vasilev
the Telerik team
As you have already noticed - RadButton is rendered as an anchor with a span and a hidden input inside of it. Most browsers like - Mozilla, Chrome and Opera are triggering the contextmenu on the anchor element (bubble effect) when the click event is triggered, while Internet Explorer is triggering it on the span element. This is a browser behaviour, and we do not have much control on it.
Regards,
Danail Vasilev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Michael O'Flaherty
Top achievements
Rank 2
answered on 31 Jan 2013, 04:40 PM
This post actually has a solution that seems to work: http://www.telerik.com/community/forums/aspnet-ajax/button/right-clicking-linkbutton-download-to-save-target-as.aspx. We are testing it now...