Open new webform in new window and on top of the all opend browser window


Hi,
As a requirement, I need to open new browser winodw with specified webform. It must be open and shown on top of the all opened browser window. I used below mentioned code line to make it work.
 1.
Response.Write("<script>window.open('NewWebForm.aspx','_blank','menubar=yes,toolbar=yes');window.focus();</script>")
2.
Response.Write("<script>window.open('NewWebForm.aspx','_blank','menubar=yes,toolbar=yes');window.focus();window.activate();</script>")
3.
Response.Write("<script>window.open('NewWebForm.aspx', '_blank', 'menubar=yes,toolbar=yes,alwaysraised=yes');</script>")
4.
Response.Write("<script>window.open('NewWebForm.aspx', '_blank', 'dialog=yes,menubar=yes,toolbar=yes,alwaysraised=yes');window.focus()</script>")

None of them, seems to be working.

Any thoughts, comments on it

Thanks
Viral

0
viralrparikh
9/15/2005 4:29:13 PM
asp.net.client-side 24353 articles. 2 followers. Follow

10 Replies
1411 Views

Similar Articles

[PageSpeed] 0
Get it on Google Play
Get it on Apple App Store

Hi Viral

Try  spesifying the script langauge. eg: Response.Write("<script langauge='javascript'></script>)

0
l0n3i200n
9/16/2005 8:17:01 AM
You can try adding this to the page that you want to stay on top, but the only way that I know of to achieve what it sounds like you want, is to use window.showModalDialog() instead of window.open().

<script language="JavaScript">
function window::onblur()
{
 window.focus();
}
</script>

NC...
0
NC01
9/16/2005 12:14:11 PM
Hi viralrparikh,

> window.open('NewWebForm.aspx','_blank','menubar=yes,toolbar=yes'); window.focus();

your code actually focuses the current page.

The open method returns a reference to the opened window, so this would work:

window.open('NewWebForm.aspx','_blank','menubar=yes,toolbar=yes').focus();

Anyway, given the "_blank" target, i can't see the point of doing this. Any new window should open on top by design, unless... focusing the opener window!

Regards. -LV

Julio P. Di Egidio
Software Analyst Programmer
=BUSINESS AND SCIENTIFIC=
=SOFTWARE DEVELOPMENT=
http://julio.diegidio.name

(Peace X Love] = [++1)
0
LudovicoVan
9/17/2005 2:26:48 AM
Hi,
I really appriciate your suggestion. I tried it but seems not to be working. I would like to give some more info,
  - clients are using window professional and IE v6.0
  - clients have popup blocker,which they turn off for a while (specially when they are testing this app)
  -  VS2003 as IDE for development, IISv5.1as web server
Is these things matters?

If you can figer out whats the problem, please let me know.
Thanks a lot any how.
Viral

0
viralrparikh
9/26/2005 2:18:43 PM
Try this:

Response.Write("<script language=JavaScript>window.showModalDialog('NewWebForm.aspx', null, 'center:yes;dialogWidth:600px;dialogHeight:400px');</script>")

NC...
0
NC01
9/26/2005 5:01:02 PM
> I tried it but seems not to be working.

Well, what's the problem? Any error message? Any undesired behaviour? What's your code actually?

> I would like to give some more info,
> Is these things matters?

I bet not because opening a new window (focusing it or not) is quite a basic operation...

-LV
Julio P. Di Egidio
Software Analyst Programmer
=BUSINESS AND SCIENTIFIC=
=SOFTWARE DEVELOPMENT=
http://julio.diegidio.name

(Peace X Love] = [++1)
0
LudovicoVan
9/26/2005 5:15:56 PM
your can use your current method and at the end do..."return false;"

or if you can create the Javascript in the HTML HEAD area use this code...

var win;
function popIT(urlToGoTo)
{
   var parms = "width=600,height=600,status=yes,menubar=yes";
   win = window.open(urlToGoTo, "ChildWindow", parms);
   win.focus();
   return false;
}

then call the function in the Body onLoad event or whatever object event you would like.

but the "return false;" will probably do it for you.
0
rviray
9/27/2005 9:43:17 PM

Something else you may try that I've found to work is to add this after your line that opens the window.

Response.Write("<script languange=javascript>setTimeout('self.blur()',250); </script>")

0
gixxerjasen
9/28/2005 8:30:13 PM

I am still messing with it but this seems to work better.

Response.Write("<script languange=javascript>function OpenDocument() {window.open('http://www.leanangle.com','MyWin');}")
Response.Write("setTimeout('OpenDocument()',250);</script>")

0
gixxerjasen
9/29/2005 5:16:46 PM
I got it to work with both  gixxerjasen suggestion and the following modification of your string. I placed this in the VB code not in the HTML although this should not make much of a difference. 

Response.Write("<script language='javascript'>window.open('docs/ILE IDEF A21.pdf','_new','width=400, height=200, status=no, toolbar=no, menubar=no, location=no');</script>")

Here, I opened a PDF document but replacing it with a URL works also.

0
geoffm
10/7/2005 1:52:09 AM
Reply:

Similar Artilces:

superreview granted: [Bug 429926] Make Cmd+T open a new window when no browser windows are open : [Attachment 317598] New version
neil@parkwaycc.co.uk <neil@httl.net> has granted jag (Peter Annema) <jag@tty.nl>'s request for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open https://bugzilla.mozilla.org/show_bug.cgi?id=429926 Attachment 317598: New version https://bugzilla.mozilla.org/attachment.cgi?id=317598&action=edit ...

superreview requested: [Bug 429926] Make Cmd+T open a new window when no browser windows are open : [Attachment 317598] New version
jag (Peter Annema) <jag@tty.nl> has asked neil@parkwaycc.co.uk <neil@httl.n= et> for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open https://bugzilla.mozilla.org/show_bug.cgi?id=3D429926 Attachment 317598: New version https://bugzilla.mozilla.org/attachment.cgi?id=3D317598&action=3Dedit ------- Additional Comments from jag (Peter Annema) <jag@tty.nl> I was thinking we could just check gBrowser at the beginning of this functi= on and call OpenBrowserWindow(), but that would use the "new window" pref sett= ing ...

superreview requested: [Bug 429926] Make Cmd+T open a new window when no browser windows are open : [Attachment 316692] BrowserOpenTab() even when no windows are open
Stefan <stefanh@bluebottle.com> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open https://bugzilla.mozilla.org/show_bug.cgi?id=429926 Attachment 316692: BrowserOpenTab() even when no windows are open https://bugzilla.mozilla.org/attachment.cgi?id=316692&action=edit ...

superreview granted: [Bug 429926] Make Cmd+T open a new window when no browser windows are open : [Attachment 316692] BrowserOpenTab() even when no windows are open
neil@parkwaycc.co.uk <neil@httl.net> has granted Stefan <stefanh@inbox.com>'s request for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open https://bugzilla.mozilla.org/show_bug.cgi?id=429926 Attachment 316692: BrowserOpenTab() even when no windows are open https://bugzilla.mozilla.org/attachment.cgi?id=316692&action=edit ...

open a new window and passing the value to that new window..
i am trying to open a new window by clicking a button.. how can i set target for it? thanks... btnSubmit.Attributes.Add("onClick", "window.open('test.htm');"); if(youTryToBeSmarter) { i.WillTryToBeNicer(); } where does this line go? within the code? or within the html? waht if i want to pass the value.....?? it goes under page_load sub. you can also do a response.redirect("test.aspx?var=" & txtTest.text ) am passing the value in txtTest text box to test.aspx page. and you can get the value frm querystring using dim getval ...

Open new windows in a new tab of the parent window
I have a sidebar that basically contains an iframe, I want links to open into a new tab of the current browser window. If I'm looking at the URL the iframe is pointing to through the browser itself, it opens up a new tab when I click on a link, but once that URL is within the sidebar, it will open up a full new browser window. I'm using JavaScript's window.open command if that helps ? Dallas Freeman wrote: > I have a sidebar that basically contains an iframe, I want links to > open into a new tab of the current browser window. > > If I'm looking at ...

superreview requested: [Bug 172962] Options for where to open URLs from other applications (reuse tab, new tab, new window) : [Attachment 159443] optional addition to divert window.open to a new tab
Dan M <danm.moz@gmail.com> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 172962: Options for where to open URLs from other applications (reuse tab, new tab, new window) https://bugzilla.mozilla.org/show_bug.cgi?id=172962 Attachment 159443: optional addition to divert window.open to a new tab https://bugzilla.mozilla.org/attachment.cgi?id=159443&action=edit ...

superreview granted: [Bug 172962] Options for where to open URLs from other applications (reuse tab, new tab, new window) : [Attachment 159443] optional addition to divert window.open to a new tab
Peter Van der Beken <peterv@propagandism.org> has granted Dan M <danm.moz@gmail.com>'s request for superreview: Bug 172962: Options for where to open URLs from other applications (reuse tab, new tab, new window) https://bugzilla.mozilla.org/show_bug.cgi?id=172962 Attachment 159443: optional addition to divert window.open to a new tab https://bugzilla.mozilla.org/attachment.cgi?id=159443&action=edit ------- Additional Comments from Peter Van der Beken <peterv@propagandism.org> >Index: dom/src/base/nsGlobalWindow.cpp >=================================...

superreview granted: [Bug 172962] Options for where to open URLs from other applications (reuse tab, new tab, new window) : [Attachment 161419] don't divert window.open to a new tab if the named wind
Johnny Stenback <jst@mozilla.jstenback.com> has granted Dan M <danm.moz@gmail.com>'s request for superreview: Bug 172962: Options for where to open URLs from other applications (reuse tab, new tab, new window) https://bugzilla.mozilla.org/show_bug.cgi?id=172962 Attachment 161419: don't divert window.open to a new tab if the named window exists https://bugzilla.mozilla.org/attachment.cgi?id=161419&action=edit ------- Additional Comments from Johnny Stenback <jst@mozilla.jstenback.com> sr=jst ...

superreview requested: [Bug 172962] Options for where to open URLs from other applications (reuse tab, new tab, new window) : [Attachment 161419] don't divert window.open to a new tab if the named wi
Dan M <danm.moz@gmail.com> has asked Johnny Stenback <jst@mozilla.jstenback.com> for superreview: Bug 172962: Options for where to open URLs from other applications (reuse tab, new tab, new window) https://bugzilla.mozilla.org/show_bug.cgi?id=172962 Attachment 161419: don't divert window.open to a new tab if the named window exists https://bugzilla.mozilla.org/attachment.cgi?id=161419&action=edit ...

how to restrict to open new window from a dialog box(i.e new window should not open from a dialog box)
i have a button. onclick event A dialog box is opened using js.The page that opens in dialog box consist of some server side scripts i.e a drop down box(C#) on which when i select a value then it retrieve some data from data base and display in a table.now the problem is that when i select value in dropdown menu then an other new window opens  and all data comes on that instead of a dialog box.so is there any way that no more windows should open after a dialog box i.e all calculations should be in the one dialog box no new windows should be opened.RegardsSHOAIB RIZWAN I have to c...

V 3.6 Open New browser window; and window loads behind main window
Name: R Novak Product: Firefox Summary: V 3.6 Open New browser window; and window loads behind main window Comments: I have tested this on Mac: Firefox 3.5.7, Safari, and PC Explorer & Firefox, and this does not happen on any of these other browsers. On a site with a javascript new window (open on mousedown) the new window appears very quickly .2 secs, then s hidden behind parent (main or previous) window. Please fix! Browser Details: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10 From...

Open a new window with window.open()
Hi, =20 in our web application, we try to open a popup-window with window.open(). But instead of opening a new window, a new tab is opened. =20 In the SeaMonkey preferences, we configured it, to open new links in a new tab. With firefox, we had the same preferences, but when window.open() was called, a new window was opened.=20 How can we configure SeaMonkey, so that it has the Firefox behavior when calling window.open() ? =20 Thanks in advance. =20 =20 =20 Artur Zeiler schrieb: > Hi, > > in our web application, we try to open a popup-window wi...

opening new window other than window.open
is there any other way of opening a new window... aside from window.open? window.open has a memory leak so i want to prevent using it as much as possible.Alvin ShihSoftware DeveloperMCP MCTS MCPD Hi window.showmodaldialog() but supports only IE....   Regards Suresh Kumar Goudampally Why dont you avoid pop up windows all together and use an iframe that is positioned over the content? Eric Pascarello.com | Twitter epascarello | LinkedIn Hi,Try Target="_blank" N.P.SenthilSoftware Engineer  Link buttons targer property is set to "_blank"...

Web resources about - Open new webform in new window and on top of the all opend browser window - asp.net.client-side

Mixing Razor Views and WebForms Master Pages with ASP.NET MVC 3 - Scott Hanselman
... General I've spent the last few weeks travelling around presenting WebMatrix, Razor and ASP.NET MVC 3 to folks. Many people have existing WebForms ...

Google Offers Webform To Comply With Europe’s ‘Right To Be Forgotten’ Ruling
Live in the European Union and want some old, irrelevant info about you deleted from search results? Google has now implemented a search removal ...

Google launches 'right to be forgotten' webform for removal requests - Technology - theguardian.com
Company responds to EU court ruling empowering citizens to have certain links about them deleted from search results

1Password no longer pasting in webforms? Here’s an easy fix
Like developer Derek Prior , I have found a number of websites have begun blocking paste operations into password fields. I’m not sure why, but ...

Google makes webform for removal of search results after European ruling
(Reuters) - Google Inc on Thursday said it has made a webform for Europeans to request the removal of results from its search engine to comply ...

Sqrl - CrunchBase Profile
Sqrl makes collecting information from clients completely painless. Accountants and other professional service providers spend as much as 25% ...

Twitter Help Center - Flagging Media Violati
Twitter is without a doubt the best way to share and discover what is happening right now.

Wikipedia talk:Assume good faith - Wikipedia, the free encyclopedia
This page is within the scope of WikiProject Spoken Wikipedia , a collaborative effort to improve the coverage of articles that are spoken on ...

Telstra customer database exposed
Telstra customer database exposed

About Telstra - Contact Us
... for Telstra, including the Telstra main switchboard number, media contacts, investor contacts and treasury contacts. It also includes a webform ...

Resources last updated: 12/18/2015 10:10:48 AM