473,626 Members | 3,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want a popup window onclick which close itself when next page is displayed

KS
Is it possible to write a javascript that makes a popup window when someone
click on buttons/href on my page and close itself when the new page is about
to get loaded? I want to prevent the user from clicking anything else on my
page while the request is getting a new page. The popup window must lock the
focus.
I use frames i can not just disable all the buttons an href in different
frames.
Jul 20 '05 #1
4 10270
Hello

you can get the window object as var newwin = window.open() ; later as the
page unloads you can call newwin.close();
to catch the document unload event capture the window.unload event.

--
Elias
http://lgwm.org/
"KS" <ka*****@hotmai l.com> wrote in message
news:3f******** @news.broadpark .no...
Is it possible to write a javascript that makes a popup window when someone click on buttons/href on my page and close itself when the new page is about to get loaded? I want to prevent the user from clicking anything else on my page while the request is getting a new page. The popup window must lock the focus.
I use frames i can not just disable all the buttons an href in different
frames.

Jul 20 '05 #2
KS
Thanx thats what i was looking for and i did something like this.

<//html file A
<SCRIPT>

// Vedlikehold av regningsadresse
function ventvindu() {
open("/PlexSysWeb/marked/venting.jsp", "jada123", "width=x,height =y");
}

</SCRIPT>
//html file B that close what A as opened
<SCRIPT>

var w = open("#", "jada123");
w.close();
</SCRIPT>

There is only one problem to this. Nothing prevents the user from clicking
on the html page A and ignore the popup window to hold youre horses until
the prosess is done. I NEED to prevent any clicking whatsoever while
somepage is prosessing. Making it bulletproof even for the most stupid user
!
"lallous" <la*****@lgwm.o rg> skrev i melding
news:bj******** ****@ID-161723.news.uni-berlin.de...
Hello

you can get the window object as var newwin = window.open() ; later as the
page unloads you can call newwin.close();
to catch the document unload event capture the window.unload event.

--
Elias
http://lgwm.org/
"KS" <ka*****@hotmai l.com> wrote in message
news:3f******** @news.broadpark .no...
Is it possible to write a javascript that makes a popup window when

someone
click on buttons/href on my page and close itself when the new page is

about
to get loaded? I want to prevent the user from clicking anything else on

my
page while the request is getting a new page. The popup window must lock

the
focus.
I use frames i can not just disable all the buttons an href in different
frames.


Jul 20 '05 #3
Hi

One suggestion is to make the popup window big enough to cover its parent.
I am not sure if Onblur event will work with window object, if so, you can
capture OnBlur and then setfocus() again.

--
Elias
http://lgwm.org/
"KS" <ka*****@hotmai l.com> wrote in message
news:3f******** @news.broadpark .no...
Thanx thats what i was looking for and i did something like this.

<//html file A
<SCRIPT>

// Vedlikehold av regningsadresse
function ventvindu() {
open("/PlexSysWeb/marked/venting.jsp", "jada123", "width=x,height =y");
}

</SCRIPT>
//html file B that close what A as opened
<SCRIPT>

var w = open("#", "jada123");
w.close();
</SCRIPT>

There is only one problem to this. Nothing prevents the user from clicking
on the html page A and ignore the popup window to hold youre horses until
the prosess is done. I NEED to prevent any clicking whatsoever while
somepage is prosessing. Making it bulletproof even for the most stupid user !
"lallous" <la*****@lgwm.o rg> skrev i melding
news:bj******** ****@ID-161723.news.uni-berlin.de...
Hello

you can get the window object as var newwin = window.open() ; later as the page unloads you can call newwin.close();
to catch the document unload event capture the window.unload event.

--
Elias
http://lgwm.org/
"KS" <ka*****@hotmai l.com> wrote in message
news:3f******** @news.broadpark .no...
Is it possible to write a javascript that makes a popup window when

someone
click on buttons/href on my page and close itself when the new page is

about
to get loaded? I want to prevent the user from clicking anything else on
my
page while the request is getting a new page. The popup window must
lock the
focus.
I use frames i can not just disable all the buttons an href in

different frames.



Jul 20 '05 #4
KS
The onblure was not a bad idee ill try it.
Have the popup cover the hole page seems a bit extreme since this is a
serious web application.
I tried jusing showModalDialog window for IE and works the way that i want.
It locks all the foucus into the window, the only problem it also stops all
the posting from the parent page until showM.. window is closed. The idea is
that the next page should close it not the user.
If i somehow could use showModalDialog , but make the parent page got to next
page, and make that next page close showModalDialog . This actually works
with window.open but then the focus will not be locked the way i want.

Another solution is to capture all click event from the usermouse and
somehow supress it after someone have clicked a button on the page. Not sure
how to this.

Since the web application a combination of frames and include i need a
general way to prevent user actions after a button are clicked. Disable all
buttons on a singel page which not use of frames is solved by using
document.getEle mentsByTagName
and loop trhough the hole document and disable whatever i want.

Thanx for the idea
Jul 20 '05 #5

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

Similar topics

38
5047
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
3
2889
by: Treetop | last post by:
I would like to pass text to a popup window to save creating a new html file for each help topic. I would like to have a value for the heading, a value for the text, code for printing the help page, and code to close the window. ------------------------------------------ the help window code is following <SCRIPT LANGUAGE="JavaScript"> <!-- Begin
1
12978
by: TErnst | last post by:
Hello All.... What I am attempting to do is have a link/button on a page (testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup page displays a resultset from a query and the selected record needs to be passed through a query string/URL parameter to the original calling page and will be available in the body onload event of the calling page. I open the popup window and display the query results, I then click on
1
11562
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution. ...
3
1661
by: Chrysan | last post by:
I have a popup window, which consist of a asp:textbox and a asp:button. And, I would like to pass the textbox.text to the javascript function when I click the button. Besides, by clicking the button, also close the popup window. The problem is, when I click the button, the textbox.text is successfully pass to the javascript function and the popup window will be closed, but the popup window will be opened again in maximize mode. I notice...
2
6932
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. After entering these two items the user can either hit the enter key or press the submit button. The popup window will close and then those two text boxes in the original webpage will be filled in automatically. I would like to have the two...
3
3572
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup and then do a refresh of the calling form. Any ideas on how to get a reference to the calling form? I tried window.parent.location.reload() , but it doesn't work. Thanks a lot.
6
4387
by: Ellie | last post by:
In my program the user clicks on a link and using the window.open function, opens a new window. I pass a url to the new window like this: <a href="#" onClick="window.open('../quotescreenwindow.php?enroll_id=enrollwindowprime.php', 'WindowC', 'width=750,height=800,scrollbars=yes');"> In the new window that just opened called quotescreenwindow.php, I
11
5288
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. How do I submit that form1 from the javascript from my current window? Thanks.
0
8269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
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
8642
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
8512
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...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4094
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
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
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
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.