473,405 Members | 2,279 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,405 software developers and data experts.

window.open in ASP page not working

dim output
output = "output = '<a href=# onclick=window.open\'http://www.google.com\');>popup</a>';"
Response.Write(output + "document.write(output);")


This is working however, when i want to resize the width and height,


dim output
output = "output = '<a href=# onclick=window.open\'http://www.google.com\', \'EProfile\', \'width=50,height=50\');>popup</a>';"
Response.Write(output + "document.write(output);")

The link doesnt work.

Any idea??
Oct 1 '07 #1
1 1553
omerbutt
638 512MB
TRY USING IT THIS WAY
Expand|Select|Wrap|Line Numbers
  1. <a href="Edit_stk.asp" onclick="return open_popup('URL')">Edit Items</a>
  2.  
u should use javascript in ur head tag to make the function open_popup() LIKE THIS AND THENspecify the width and height in the window.open(url,width,height)
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function open_popup(url)
  3. {
  4.    newwindow=window.open(url);
  5.      if(window.focus)
  6.      {
  7.     newwindow.focus();        
  8.      }
  9.     return false;
  10. }
  11. </script>
  12.  
hope that solved ur prob
dim output
output = "output = '<a href=# onclick=window.open\'http://www.google.com\');>popup</a>';"
Response.Write(output + "document.write(output);")


This is working however, when i want to resize the width and height,


dim output
output = "output = '<a href=# onclick=window.open\'http://www.google.com\', \'EProfile\', \'width=50,height=50\');>popup</a>';"
Response.Write(output + "document.write(output);")

The link doesnt work.

Any idea??
Nov 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
3
by: Michael | last post by:
I am trying to allow a user to view a PDF in a new window. I currently have this working using the following: <a href="./pdf.do?parameter=01121980" target="top"><b>pdf</b></a> The problem...
3
by: Steve | last post by:
Hi, I have a nice little script that works well displaying images on my website. It's a script where if you clik a thumbnail image a pop up window opens that contains a larger version of the same...
3
by: Fred Atkinson | last post by:
I've installed the following Javascript on my Web page and it is working fine. It brings up a little pop up message (not an ad). <script language="JavaScript"><!--...
10
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="#"...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
14
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas....
2
by: carlor | last post by:
Hi there, I have a form that contains a link button. When the user clicks the link button I need to enable a couple of other buttons on the page and open a new browser window giving it focus...
8
by: johnsonholding | last post by:
Here is the code for a pop-up window that works in Firefox and not in IE - I get a java error or something, Here is the code : </script> <SCRIPT language="JavaScript"...
5
by: lindanr | last post by:
In ASP.NET 2005 I have an onblur="window.close()" javascript event in the <body> tag. When I click on the window's scrollbar, the window closes. The same code works fine in ASP.NET 2003. Any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.