Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2005, 04:34 PM
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP/JS Button opening a new window

Currently writing a section of code in ASP that has JS embedded in it. Getting some errors and am not sure what the problem is.


Response.Write "<br><a href="#" onClick="NewWindow('long address is here','width=800,height600,taskbar=no,location=no, menubar=no,center')"><img src=images\document_r2_c2.gif border=0></a>"

 
Old December 22nd, 2005, 05:44 PM
Authorized User
 
Join Date: Jul 2005
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Protected void Page_Load(object sender, EventArgs e){
  myAnchor.Attributess["onclick"] = "window.open('long address is" +
" here','width=800 ..... ";
}

<a id="myAnchor" runat="server"> Your anchor </a>

 
Old December 23rd, 2005, 09:25 AM
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Getting an error on the following line. VBscript error.

Quote:
quote:Originally posted by g2000
 Protected void Page_Load(object sender, EventArgs e){
  myAnchor.Attributess["onclick"] = "window.open('long address is" +
" here','width=800 ..... ";
}

<a id="myAnchor" runat="server"> Your anchor </a>

 
Old December 23rd, 2005, 01:20 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You posted this in an ASP.NET 2.0 answer, so I guess g2000 assumed you wanted a solution for ASP.NET 2.

If this is about classic ASP, I suggest you repost this question in an ASP forum located here: http://p2p.wrox.com/asp-net-asp-12

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
WebBrowser vs JS window.open cbolon ASP.NET 2.0 Professional 1 March 13th, 2006 09:56 AM
Opening new window in button handler drono ASP.NET 1.0 and 1.1 Professional 1 May 29th, 2005 10:32 PM
Opening a new window in a button handler drono Classic ASP Basics 1 May 29th, 2005 06:12 PM
asp.net-opening a new window imsuneeta General .NET 14 January 6th, 2005 04:44 AM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.