473,837 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open a new window without javascript and without hyperlink

Dan
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 find a way to opŁen a new window as result of a buttonm click.

thanks for help,
dan
Nov 18 '05 #1
8 4369
Hello dan,

You'll need to either use javascript, or an anchor tag with a target=_blank.

Either: window.open('so meURL') or <a href="someURL" target="_blank" >

You can not open a window from the server, as the server has no concept of
a browser. The only thing you can do from the server is render code (as above)
to do this on the client.

--
Matt Berther
http://www.mattberther.com
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 find a way to opŁen a new window as result of a buttonm
click.
thanks for help,
dan

Nov 18 '05 #2
"Dan" <da**********@z dv.uni-tuebingen.de> wrote:-
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 find a way to opŁen a new window as result of a buttonm

click.

you could make the button a submit button in a form, and have the target of
the form set to _blank (see example below, and see
http://www.w3.org/TR/html4/interact/forms.html for more on the syntax.), or
you could 'fake' a button, by using and image of a button as a link.

eg. 1
<form action="http://somesite.com/somepage.html" method="post"
target="_blank" >
<input type="submit" value="Send" />
</form>

eg. 2
<a href="http://somesite.com/somepage.html" target="_blank" >
<img src="fakeButton .png" alt="I'm a Button, Honest" />
</a>

--
Martin Eyles
ma**********@NO SPAM.bytronic.c om
Nov 18 '05 #3
Put a big block of text in your page that says "Open a new browser and go to
the following URL in it: Your URL". If you're lucky, some of your users will
do it. Otherwise, use a link, or JavaScript.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dan" <da**********@z dv.uni-tuebingen.de> wrote in message
news:cn******** **@newsserv.zdv .uni-tuebingen.de...
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 find a way to opŁen a new window as result of a buttonm click.
thanks for help,
dan

Nov 18 '05 #4
I'm thinking that there must be some reason why you don't want to use
JavaScript. Perhaps it's because you have some server-side processing to do,
which necessitates a PostBack, and you don't hink you can open a new window
once the page reloads. But you can. Just add the script using
Page.RegisterSt artupScript().

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dan" <da**********@z dv.uni-tuebingen.de> wrote in message
news:cn******** **@newsserv.zdv .uni-tuebingen.de...
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 find a way to opŁen a new window as result of a buttonm click.
thanks for help,
dan

Nov 18 '05 #5
popup blockers prevent this approach - so I'd avoid it.

-- bruce (sqlwork.com)
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uc******** ******@TK2MSFTN GP15.phx.gbl...
| I'm thinking that there must be some reason why you don't want to use
| JavaScript. Perhaps it's because you have some server-side processing to
do,
| which necessitates a PostBack, and you don't hink you can open a new
window
| once the page reloads. But you can. Just add the script using
| Page.RegisterSt artupScript().
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Dan" <da**********@z dv.uni-tuebingen.de> wrote in message
| news:cn******** **@newsserv.zdv .uni-tuebingen.de...
| > 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 find a way to opŁen a new window as result of a buttonm
| click.
| >
| > thanks for help,
| > dan
|
|
Nov 18 '05 #6
Well, Bruce, as you know, there are precisely THREE ways to open a new
browser window:

1. JavaScript
2. Target frame of hyperlink or form submit
3. Get the User to do it.

Which way would you use?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"bruce barker" <no***********@ safeco.com> wrote in message
news:ef******** ******@TK2MSFTN GP14.phx.gbl...
popup blockers prevent this approach - so I'd avoid it.

-- bruce (sqlwork.com)
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uc******** ******@TK2MSFTN GP15.phx.gbl...
| I'm thinking that there must be some reason why you don't want to use
| JavaScript. Perhaps it's because you have some server-side processing to
do,
| which necessitates a PostBack, and you don't hink you can open a new
window
| once the page reloads. But you can. Just add the script using
| Page.RegisterSt artupScript().
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Dan" <da**********@z dv.uni-tuebingen.de> wrote in message
| news:cn******** **@newsserv.zdv .uni-tuebingen.de...
| > 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 find a way to opŁen a new window as result of a buttonm
| click.
| >
| > thanks for help,
| > dan
|
|

Nov 18 '05 #7
Well Kevin I guess there are no other ways for Now!
Patrick

"Kevin Spencer" wrote:
Well, Bruce, as you know, there are precisely THREE ways to open a new
browser window:

1. JavaScript
2. Target frame of hyperlink or form submit
3. Get the User to do it.

Which way would you use?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"bruce barker" <no***********@ safeco.com> wrote in message
news:ef******** ******@TK2MSFTN GP14.phx.gbl...
popup blockers prevent this approach - so I'd avoid it.

-- bruce (sqlwork.com)
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uc******** ******@TK2MSFTN GP15.phx.gbl...
| I'm thinking that there must be some reason why you don't want to use
| JavaScript. Perhaps it's because you have some server-side processing to
do,
| which necessitates a PostBack, and you don't hink you can open a new
window
| once the page reloads. But you can. Just add the script using
| Page.RegisterSt artupScript().
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Dan" <da**********@z dv.uni-tuebingen.de> wrote in message
| news:cn******** **@newsserv.zdv .uni-tuebingen.de...
| > 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 find a way to op√ľen a new window as result of a buttonm
| click.
| >
| > thanks for help,
| > dan
|
|


Nov 18 '05 #8
Dan
the expectation was that the site must work with disabled js.
and i don't want to use a link because before the new window will open,
some server side action must be performed with data of the actual window.
also, i cannot set the form target because not all the web controls have
to perform a new page being opened.
ok, then i have to take a two step navigation:
1. button event takes starts server side action
2. link click opens new window
Patrick.O.Ige wrote:
Well Kevin I guess there are no other ways for Now!
Patrick

"Kevin Spencer" wrote:

Well, Bruce, as you know, there are precisely THREE ways to open a new
browser window:

1. JavaScript
2. Target frame of hyperlink or form submit
3. Get the User to do it.

Which way would you use?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"bruce barker" <no***********@ safeco.com> wrote in message
news:ef****** ********@TK2MSF TNGP14.phx.gbl. ..
popup blockers prevent this approach - so I'd avoid it.

-- bruce (sqlwork.com)
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uc***** *********@TK2MS FTNGP15.phx.gbl ...
| I'm thinking that there must be some reason why you don't want to use
| JavaScript. Perhaps it's because you have some server-side processing to
do,
| which necessitates a PostBack, and you don't hink you can open a new
window
| once the page reloads. But you can. Just add the script using
| Page.RegisterSt artupScript().
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Dan" <da**********@z dv.uni-tuebingen.de> wrote in message
| news:cn******** **@newsserv.zdv .uni-tuebingen.de...
| > hello all,
| > is there a way to open a new window without javascript and a
href=_blan k?
| > i need to connect a button click with some lines of code and then, a


new
| > window shall get opened.
| > but i didn't find a way to op√ľen a new window as result of a buttonm
| click.
| >
| > thanks for help,
| > dan
|
|


Nov 18 '05 #9

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

Similar topics

18
8858
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 (same folder). The cookie is not received. Can someone explain why? I worked around this by adding a cache-control header with a value of no-cache. This fixes the problem. Unfortunately that causes another problem with Internet Explorer...
40
10863
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 defaulting the the first active window. How do I make a hyperlink point to the active window? I don not want the hyperlink to default to the same page. I do want a second window but only a second window and not multiple pages.
4
19617
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 other values to specify a popup window. Olav
4
2793
by: KenG | last post by:
Hi: I have a datagrid that builds a hyperling which uses javascript to open a new window. The new window opens and displays fine, however, the original window that has the grid, is now blank with only "" displayed in an otherwise empty window. To restore the datagrid in that window, I have to use the browsers "back" button. How can I stop the parent window from changing?
5
2536
by: Chris | last post by:
Hello, I have a link on an aspx page. The URL is set in the Page Load event: lnkEventHistory.NavigateUrl = "javascript:window.open('EventHistory.aspx?TeenID=" & _ Request.Item("SubjectID") & "&EventCode=" & Request.Item("EventCode") & "')" When I click the link, the new window opens as expected. The problem is
2
7345
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 javascrit:window.open('MyPage.aspx',status=1,location=1,resizable=yes,scrollbars=yes) 2 - I am using a HyperLink and using the NagigateUrl property to open a pdf in a new window with the targer set as "_Blank" The trouble I am having is trying to keep the focus on the new window....
9
2867
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 window without scrollbars, status bar, tool bar and with specified height and width. Can it be done on "onload" event of the page2.aspx in javascript?
9
3160
by: smokeyd | last post by:
hi, can anyone tell me how to open a link in a new browser window in vbscript.net. i am looking to be able to set the properties such as size, menu bar, scroll bar etc. or alternativelly is there a simple way to do this in visual web developer? many thanks in advance for your help.
6
12082
by: bushi | last post by:
hi everyone! i have diplayed my hyperlinks in a iframe.when i redirect to next page.the next page also open in the same frame,but i want to open a new browser window,when i click on the link.actually i 'm using link button control to diplay the hyperlinks.i cant use java script "window.open()".i need some server side code behind the linkbutton,if any one knows plz rply soon.
0
9682
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10867
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10562
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10263
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectóplanning, coding, testing, and deploymentówithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6989
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5666
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5842
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4469
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.