This project is read-only.

Open new Window from PowerWebpart

Sep 2, 2009 at 2:11 PM

Hi Christian,

can you please help me with the following:

I add a new Item in a list through the powerwebpart. After the Item is added, i like ti open the Edit or Dispform.aspx for this item in an new window!

Is there any way to do this from powershell within in the webpart?

I tryed to use $ie = new-object -com "InternetExplorer.Application" but this only works in the powershell console, not in the webpart :(

Do you have any hints for me?



Sep 2, 2009 at 9:55 PM

Hello Michael,

user javascript.



Register-JavaScriptBlock -name "OpenNewWindow" -script $script 

Not sure if this 1000% correct, but it's a step in the right direction ;-)



Sep 3, 2009 at 9:50 AM

Hi Christian,

thanks for your help!

Should the script execute when i register it via Register-JavaScriptBlock, or do i have to call it? If i have to call it, how does it work?



Sep 3, 2009 at 2:13 PM

Hi Christian,

sorry, it was my fault --> my javascript code was wrong....

Everything works fine :)

Thanks a lot!

I really like your webpart :))