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

Hyperlink Javascript window.open()

Hi,

I have the following in my asp .net web page. It opens a separate browser
window. However, on the main page, all of the contents is gone and shows
nothing but [object]. I have to use the Back button to get the main page
back.

How can I open a separate browser window and keep all the contents on the
main page? Thanks.

<a href="javascript:window.open('ShowImage.aspx');">I mage</a>
Jan 11 '08 #1
3 2591
Solved. Used Target instead. Thanks.

"John" wrote:
Hi,

I have the following in my asp .net web page. It opens a separate browser
window. However, on the main page, all of the contents is gone and shows
nothing but [object]. I have to use the Back button to get the main page
back.

How can I open a separate browser window and keep all the contents on the
main page? Thanks.

<a href="javascript:window.open('ShowImage.aspx');">I mage</a>
Jan 11 '08 #2
<a href="#" onclick="window.open('ShowImage.aspx');">Image</a>
"John" <Jo**@discussions.microsoft.comwrote in message
news:02**********************************@microsof t.com...
Hi,

I have the following in my asp .net web page. It opens a separate browser
window. However, on the main page, all of the contents is gone and shows
nothing but [object]. I have to use the Back button to get the main page
back.

How can I open a separate browser window and keep all the contents on the
main page? Thanks.

<a href="javascript:window.open('ShowImage.aspx');">I mage</a>

Jan 11 '08 #3
Scott M. has definately provided the more correct solution. You might also try,

<a href="" onclick="window.open('ShowImage.aspx');return false;">Image</a>

This will ensure that the href action does not bubble through the page's
client side event cycle and will also not change the page URL by appending a
pound sign. You do not need a value in the href property, the browser will
render an empty href value as a link (if you exclude the href property all
together you will simply get text, not a hyperlink).

--
Chad Scharf
_______________________________
http://www.chadscharf.com
"Scott M." wrote:
<a href="#" onclick="window.open('ShowImage.aspx');">Image</a>
"John" <Jo**@discussions.microsoft.comwrote in message
news:02**********************************@microsof t.com...
Hi,

I have the following in my asp .net web page. It opens a separate browser
window. However, on the main page, all of the contents is gone and shows
nothing but [object]. I have to use the Back button to get the main page
back.

How can I open a separate browser window and keep all the contents on the
main page? Thanks.

<a href="javascript:window.open('ShowImage.aspx');">I mage</a>


Jan 12 '08 #4

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

Similar topics

40
by: Brian Jorgenson | last post by:
On my web page, I have a few hyperlinks with target frame of _blank. The hyperlink brings up a second window, but everytime I click on thie hperlink, it keeps bringing up a new window and not...
4
by: Amir Eshterayeh | last post by:
Dear Friends My asp hyperlink goes to relative address instead of absolute. I like navigate url goes to outsite link like www.asp.net but now, it goes to www.mysite/www.asp.net please help....
4
by: Olav Tollefsen | last post by:
I have an <asp:Hyperlink> in my .aspx file. How can I configure it to open the URL (NavigateURL) in a popup window instead of a new normal browser window. I use Target="_blank", but didn't find...
3
by: francois | last post by:
hi all, I have hyperlink controld in my aspx webpage. When i click on it it needs to open a new window, then i added the attribute target="_blank" But I would like to also give a size to the...
6
by: sck10 | last post by:
Hello, Can you control the window attributes (toolbar, scrollbars, left and right exc.) when using the hyperlink control as you would when using javascript? For examle, I am using the...
8
by: Dan | last post by:
hello all, is there a way to open a new window without javascript and a href=_blank? i need to connect a button click with some lines of code and then, a new window shall get opened. but i didn't...
2
by: Jawahar | last post by:
I am trying to open a new window in two ways 1 - adding javascript to the onclick attribute of an Image button to open a pdf document in a new window as...
9
by: loga123 | last post by:
I am using asp .net 2.0. I have a hyperlink asp control on my web page page1.aspx. On clicking this hyper;link, I would like to open page2.aspx (which is in the same web application) in a new IE...
1
by: ashtek | last post by:
Hi, I am using a hyperlink on a datagrid (templatecolumn) to display a link. Onclick of this link I want to open a new window without tool bar & with certain width & height. I am using this code...
7
by: ashtek | last post by:
I have an <ASP:HYPERLINKon a datagrid (templatecolumn) and I need to open a new window with no toolbar and specific height & width onclick of the link. I also want to pass the PK to this new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
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
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
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...

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.