onclick event through javascript

  • Thread starter Thread starter Siva
  • Start date Start date
S

Siva

Dear All,

I have a image button, what i need is if somebody clicks the image i
want a popup window to be thrown (customized window, without menubar,
no scroll, height, width etc.,).

Please help me in getting the code.

cheers
Siva
 
Heres an example you should be able to work from

<html>
<head>
<script language="VB" runat="server">

Sub Page_Load( sender as Object,e as EventArgs)

'Form the script that is to be registered at client side.
Dim scriptString as String = "<script language=JavaScript> function
DoClick() {"
ScriptString +=
"window.open('http://www.mvps.org','MyWindow','width=500,height=500');} <"
scriptString += "/"
scriptString += "script>"

If(Not IsClientScriptBlockRegistered("clientScript"))
RegisterClientScriptBlock("clientScript", scriptString)
End If
End Sub
</script>
</head>
<body topmargin="20" leftmargin="10">
<form id="myForm" runat="server">

<INPUT id="launchButton" onclick="DoClick();" type="button"
value="Submit" name="myButton" runat="server">

</form>
</body>
</html>
 
Back
Top