cancel
Showing results for 
Search instead for 
Did you mean: 

how to open a new browser window?

Former Member
0 Kudos

Hi,all

I create a iView on portal by pdk .net .I want to open a new IE window to access a url. How to do? Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Yang,

use javascript for opening a new window.

window.open("url","name","properties")

hope it helps..,

Regards,

Vinoth

Former Member
0 Kudos

But I use the javascript in the HTML page.It's no error when deploying to the portal.But I can not run the iView in the portal.Why?

Former Member
0 Kudos

hi Yang,

can u post the code or send me the error u got..

Regards,

Vinoth

Answers (3)

Answers (3)

Former Member
0 Kudos

I found the way to open new window

first at the html page, add the code:

<script language="javascript">

function openwindow(){

window.open("http://www.google.com");

}

</script>

in the page_load event,add the code:

private void Page_Load(object sender, System.EventArgs e)

{

this.ImageButton1.Attributes.Add("onclick","openwindow()");

}

Now,I can open the new window .

Former Member
0 Kudos

Hi,

My code is:

<%@ Control language="c#" Codebehind="PortalComponent1.ascx.cs" AutoEventWireup="false" Inherits="sale_contract.PortalComponent1" targetSchema="http://schemas.microsoft.com/intellisense/ie5" %>

<!%@ PortalComponent name="PortalComponent1" %>

<LINK href="C:\Program Files\SAP\Portal Add-in for Visual Studio 2003\Controls\ur\ur_design.css"

type="text/css" rel="stylesheet">

<body class="prtlBody" xmlns:sap="urn:http://schemas.sap.com/SAP.Web.UI.Controls">

<P>

<asp:ImageButton id="ImageButton1" OnClick="window.open('http://www.sap.com')" runat="server" Width="120px"></asp:ImageButton>

</P>

</body>

But run in the portal,it shows:

iView cannot display.

Could not process the .NET portal component.

Contact your administrator if the problem persists.

Recommended actions for administrators:

1. View the portal log for more information.

2. To display the ASP.NET messages in the browser, set the Display ASP.NET Stack on ASP.NET Error property of 'iViewProcessorService' service to 'true'.

Exception id: 11:57_04/06/06_0395_2730850

See the details for the exception ID in the log file

Message was edited by: yang lin

Former Member
0 Kudos

Hi Yang,

1. Write(window.open("url","name","properties")); in .ascx file

OR

2. use LinkToURL-control in desiger

regards,

Simon