Hello,
i want to open a new window when a button is clicked. I am working in
ASP.net / VB. However my code is not working.
This is my Script Code:
<script runat="server">
Private Sub openNewWindow(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Response.Write("<script>window.open 'http://www.google.com', '_new',
'width=400, height=200, status=no, toolbar=no, menubar=no, location=no');
</script>")
End Sub
</script>
and this is my Button Code:
<asp:Button CssClass="button" ID="buttonID" runat="server" Text="Go"
onClick="openNewWindow"/>
Can you tell me what am i doing wrong?
Thank You,
Miguel 2 1817
use an html button, not an asp control
use the onClick then
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"Miguel Dias Moura" <in************@27lamps.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Hello,
i want to open a new window when a button is clicked. I am working in ASP.net / VB. However my code is not working.
This is my Script Code:
<script runat="server">
Private Sub openNewWindow(ByVal sender As System.Object, ByVal e As System.EventArgs) Response.Write("<script>window.open 'http://www.google.com', '_new', 'width=400, height=200, status=no, toolbar=no, menubar=no, location=no'); </script>") End Sub
</script>
and this is my Button Code:
<asp:Button CssClass="button" ID="buttonID" runat="server" Text="Go" onClick="openNewWindow"/>
Can you tell me what am i doing wrong?
Thank You, Miguel
you should to use <script language='JavaScript'> instead of <script>
right?
best regards,
Marcos
"Miguel Dias Moura" <in************@27lamps.com> escreveu na mensagem
news:#d**************@TK2MSFTNGP09.phx.gbl... Hello,
i want to open a new window when a button is clicked. I am working in ASP.net / VB. However my code is not working.
This is my Script Code:
<script runat="server">
Private Sub openNewWindow(ByVal sender As System.Object, ByVal e As System.EventArgs) Response.Write("<script>window.open 'http://www.google.com', '_new', 'width=400, height=200, status=no, toolbar=no, menubar=no, location=no'); </script>") End Sub
</script>
and this is my Button Code:
<asp:Button CssClass="button" ID="buttonID" runat="server" Text="Go" onClick="openNewWindow"/>
Can you tell me what am i doing wrong?
Thank You, Miguel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul |
last post by:
I link to a web site from an Excel spreadsheet. The page i link to is
getCookie.asp which sets a cookie then returns back some html which opens a
new window, to the same site but a different page...
|
by: lukeo |
last post by:
I'm shelling out to an .asp (or htm) page from an application. I want
to show this in a window without the address bar, etc...
Is there a way I can redirect this page using javascript to a page...
|
by: Marshall Dudley |
last post by:
When I do the following line in Netscape, the popup loads as it should,
but the parent window usually, but not always, reloads as well.
<a href="#"...
|
by: Ian Sedwell |
last post by:
Hi guys
The following code works just fine in Netscape on MacOS and Windows. But in
Explorer on MacOS and Windows it throws a type mismatch error at the point
marked with the comment ³// bug out...
|
by: Bob |
last post by:
I am trying to create a popup page (to act as a menu) from a parent
page. When the parent page (index.jsp) calls my popup function (see
below) it will properly open the correct size browser window...
|
by: Mateo |
last post by:
Hi!
I tried to open page in new window with window.open(...) method.
open() method supports fullscreeen mode, but I would like to open
new maximized window with tiltle bar only....
Any idea...
|
by: Miguel Dias Moura |
last post by:
Hello,
i want to open a new window when a button is clicked. I am working in
ASP.net / VB. However my code is not working.
This is my Script Code:
<script runat="server">
Private Sub...
|
by: Sam |
last post by:
I have 2 jsp pages which are loaded from the same browser window.
Inside these jsp pages, I have created 2 windows to write client side
log. I have used different id for 2 windows as follow.
In...
|
by: Toccoa |
last post by:
After considerable googling - I mean searching with Google(r) - I
could not find javascript on a button or <a href=... to close a
window in the latest versions of IE and FireFox.
There seemed...
|
by: Bob Jones |
last post by:
Here is my situation:
I have an aspx file stored in a resource file. All of the C# code is
written inline via <script runat="server"tags. Let's call this page
B. I also have page A that contains...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |