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

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 10244
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*****@hotmail.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.org> 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*****@hotmail.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*****@hotmail.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.org> 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*****@hotmail.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.getElementsByTagName
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
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...
3
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...
1
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...
1
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...
3
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...
2
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. ...
3
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...
6
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="#"...
11
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. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: 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...

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.