473,395 Members | 1,343 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,395 software developers and data experts.

Link to Page in new window

I am trying to set up a link to open a new page in a separate window.
Normally I could use:

Target="_blank"

But I want to put it in a smaller window.

I tried to do:

<asp:HyperLink ID="ContactUS"
NavigateUrl="javascript:window.open('/employer/secure/contact_info.aspx',null,
'height=200, width=400, status=yes, toolbar=no, menubar=no, location=no'); "
Text="Contact Us" runat="server"/>

It creates the new window fine, but it wipes out the original window and the
only think in the window is:

[Object]

Why is this happening and how can I make it work?

Thanks,

Tom
Sep 12 '06 #1
1 1192
You're on the right track. The window.open method is indeed the way to go.
I've detailed it's workings here, and created a control that encapsulates
the details so you don't have to worry about it if you don't want:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"tshad" <ts**********@ftsolutions.comwrote in message
news:uu**************@TK2MSFTNGP02.phx.gbl...
>I am trying to set up a link to open a new page in a separate window.
Normally I could use:

Target="_blank"

But I want to put it in a smaller window.

I tried to do:

<asp:HyperLink ID="ContactUS"
NavigateUrl="javascript:window.open('/employer/secure/contact_info.aspx',null,
'height=200, width=400, status=yes, toolbar=no, menubar=no, location=no');
" Text="Contact Us" runat="server"/>

It creates the new window fine, but it wipes out the original window and
the only think in the window is:

[Object]

Why is this happening and how can I make it work?

Thanks,

Tom

Sep 12 '06 #2

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

Similar topics

1
by: Mat | last post by:
How can I detect when a link has been clicked but the new page is still in the process of loading? The document.location.href property still displays the current location (understandably) not the...
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: Farooq Karim | last post by:
Greetings; I am unable to solve this problem; I hope someone will come up to show his brilliance. From my web page I open another link in another browser window. That new window is composed...
6
by: juglesh | last post by:
hello, I just want to be able to use a keypress to do the same as clicking a link. such as will 'click' a certain link, while will 'click' a different link. thanks for your time, juglesh ...
13
by: zn | last post by:
How can I cause a link on a page to open up a new browser window when the link is clicked on? I've noticed javascript code sometimes when I try to right-click a link and open it in another window....
36
by: randau | last post by:
I would like to use the Link Target attribute, but am inhibited by the likelihood of a newly opened browser window completely hiding the Parent browser window. Thus offering the illusion that...
3
by: JohnEGee | last post by:
Hello, all, and TIA for any help you can offer. I've searched the Internet for answers and have finally come here. I've created a page (several, actually) with a link that opens a pop-up...
1
by: John | last post by:
Hi, I'm having a problem opening / downloading csv files when called from a page opened with window.showModalDialog( ). To isolate this problem, I've written 3 files (see below). 1. main.htm...
8
by: Salvatore Sanfilippo | last post by:
Hello all, I've a very simple problem that appears to don't have a simple solution. I've a (dynamically generated) page with a number of external links. What I need is that if the user clicks...
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
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?
1
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...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.