473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Sep 1 '06 #1
1 935
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=JavaScriptfunction
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>

--
--
Regards

John Timney (MVP)
"Siva" <si********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.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

Sep 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mike piano | last post by:
With html buttons, I can say onclick="MyFunction();" and it calls a JavaScript function called "MyFunction", but with the Web Controls buttons, OnClick="MyFunction();" produces an error: ...
2
by: Sedef | last post by:
Hi, i'm trying to create a custom Button user control which will be derived from System.Web.UI.WebControls.Button. the normal server side Button class creates some client side javascript code for...
5
by: moondaddy | last post by:
I have a <a> element in a datagrid which wraps some asp.net labels. this element also has an onclick event which does not fire in netscape 6 (and perhaps other browsers for all I know...). Below...
4
by: Mark Rae | last post by:
Hi, VS.NET 2003 on WinXPPro, both with all the latest patches and updates, etc... I've got a very simple WebForm which is used either to add a new record to a SQL Server database or edit a...
4
by: phil | last post by:
Hi, I defined a Html button but added the option 'runat="server" ' like this: <form id="form1" runat="server"> <input id="Button1" type="button" value="button" runat="server" onclick="hfd()" ...
7
by: extremerep | last post by:
My task is to change the value of a button and then make it functional with the onClick handler. Changing the value to "Play Again" works, but making the onClick work accordingly does not. The...
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
5
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a...
4
by: donpro | last post by:
Hi, I've created a table where the header columns link to an AJAX function which calls a PHP file and returns content - the purpose is to sort the table on the heading. The code snippet is:...
17
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/this-alert.html http://www.frostjedi.com/terra/scripts/demo/this-alert2.html Why, when you click in the black box, do the alert boxes say different...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.