cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a URL from a button

Former Member
0 Kudos

Hi Experts,

In my requirement I have to call a URL in the same page,through a button,

so please tell me how to acheive this.

Regards

Upendra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

use the below code to call the URL onAction of the Button,


IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(
"<place URL here example http:www.sdn.sap.com>",
"<description about the URL >",
false);
window.open();

Regards,

ramesh

Former Member
0 Kudos

Thanks Ramesh for the Reply,

But, the code you provided opens the URL in a new Window,

I want it to be In the same Window.

Please Give your helpful Suggestions.

Regards

Upendra

Former Member
0 Kudos

Could you check using an iFrame UI element?

Take an iFrame UI element in your View,

Set the url "source" property of this iFrame on the click of button i.e, in the onActionButtonClick() ?

i.e bind this source property to a context attribute, set this attribute in the onAction method.

Hope this helps.

Answers (2)

Answers (2)

former_member1
Active Participant
0 Kudos

You will be able to solve it using IFrame UI Element.

If you are using CE, IFrame UI Element is not available. You have to use IWDIFrame to create the iFrame. Though this method is deprecated, but if I understood your problem correctly, this will solve your problem.

Thanks

Former Member
0 Kudos

you can use UI element linktourl

with regards

shanto aloor