Open in New Window

Unofficial Content

Have you ever wanted to open genexus objects such as webpanels, pdf reports in new browser window?

It's really simple using the user control InNewWindow

If using GeneXus v15 U6 or higher, we recommend using 'Web Extension Toolkit' instead of 'InNewWindow': Go To Link

Instructions:

Drag the user control to the webform.

Event Enter
  InNewWindow1.Target = "http://www.google.com"
  InNewWindow1.Scrollbars = true
  InNewWindow1.Width = '900'
  InNewWindow1.Height = '600'
  InNewWindow1.OpenWindow()
EndEvent

Control Properties

  • Target: URL that will be open. 
  • Width and Height: the dimensions of the popup in pixels.
  • Name: Specifies the target attribute or the name of the window. The following values are supported:
    • _blank: The url is loaded into a new, unnamed window.
    • _parent: The url is loaded into the current frame's parent. If the frame has no parent, this value acts as the value _self.
    • _self: The current document is replaced with the specified url.
    • _top: The loaded url replaces any framesets that might be loaded. If there are no framesets defined, this value acts as the value _self.
  • Fullscreen: how to open a full screen popup.
  • Location: Shows or hides the URL field in the new window. FF and IE don’t allow to hide it by default.
  • Menu Bar: Shows or hides the browser menu on the new window; deprecated in newer browsers.
  • Resizable: Allows to disable the resize for the new window. Not recommended.
  • Scrollbars: Allows to disable the scrollbars for the new window. Not recommended; not supported in Google Chrome.
  • Title Bar: Shows or hides the browser title bars.
  • Tool Bar: Shows or hides the browser navigation bar (back, forward, reload etc) on the new window; not supported in Google Chrome.
  • directories: if the popup should have a row across the top with buttons to popular web sites.
  • status: Shows or hides the status bar. Again, most browsers force it to show; not supported in Google Chrome.
  • copyhistory: Whether or not to copy the old browser window's history list to the new window.
  • left/top: Coordinates of the window top-left corner on the screen. There is a limitation: a new window cannot be positioned offscreen.
  • fitscreen: Whether or not the new Window should fit the parent window.
  • refresh parent on close: Refresh parent object when closing the prompt.
  • Control Name: Internal Control name.
  • Targets: (Character Collection) For opening multiple differents popups at once. 

Methods

  • OpenWindow: Opens a new browser window.
  • SetFocus: Focus the browser on the new window.

See Also

http://www.w3schools.com/jsref/met_win_open.asp