onclick event through javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Siva

    #1

    onclick event through javascript

    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

  • John Timney \(MVP\)

    #2
    Re: onclick event through javascript

    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=JavaSc riptfunction
    DoClick() {"
    ScriptString +=
    "window.open('h ttp://www.mvps.org',' MyWindow','widt h=500,height=50 0');} <"
    scriptString += "/"
    scriptString += "script>"

    If(Not IsClientScriptB lockRegistered( "clientScript") )
    RegisterClientS criptBlock("cli entScript", scriptString)
    End If
    End Sub
    </script>
    </head>
    <body topmargin="20" leftmargin="10" >
    <form id="myForm" runat="server">

    <INPUT id="launchButto n" onclick="DoClic k();" type="button"
    value="Submit" name="myButton" runat="server">

    </form>
    </body>
    </html>

    --
    --
    Regards

    John Timney (MVP)
    "Siva" <sivakumarj@gma il.comwrote in message
    news:1157101399 .248977.152290@ b28g2000cwb.goo glegroups.com.. .
    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
    >

    Comment

    Working...