Freigeben über


OpenNewWindow - Small web page - Not a popup.

Was wondering for a while about how to show certain tips to the customers in my web application, which is a touch more than the normal tooltip. Well, you would be thinking about that too. The answer is here. You can perform this using the following

  • Use a image button on your screen with any selected image.
  • In the property named OnClientClick for this imagebutton, set the value to OpenNewWindow("tips.aspx")
  • In the script section (javascript), write the client side code as given below

<

script type="text/javascript">

function

OpenNewWindow(target)

{

var win=window.open(target,"TheNewWindow",

"height=120,width=200,menubar=0,left=500,top=300,screenX=100,screenY=500");

  win.focus();

}

</script>

What are we doing here? we are saying that this image button has to execute the javascript (which opens the page desired in the given size) on the client side click event. This method helps us to show something more than that of a tooltip. We can make it more usable viz provocative to the user by having a help icon for the image in the imagebutton.