473,769 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make a window modal in nature

Hi,

I have a javascript, calendar.js which i use to enable my client to
select the date. This calendar pops up on the click of a gif image.
But the problem is that this poped up window is not modal in nature(i
do not want the user to go the parent page unless he selects some date
in the calendar popup).

In the javascript calendar.js he has used window.open() function to
pop up the window. i just want to know whether we have any attribute
which when set to yes will make the window behave modal in
nature.(just like resizable="yes" ,toolbar="yes", do we have
modal="yes" ?)

i checked modal="yes" and it does not make the window behave modal in
nature. Am i using the wrong attribute name?(modal="ye s").

Do we have such attribute. If not what are my other options.

I know that we can use window.showModa lDialog(), but i need to modify
the window.open() function to make the window behave modally. Is it
possible to do so?

regards
Amith
Jul 20 '05 #1
1 12530
"amith" <it*******@yaho o.co.in> wrote in message
news:90******** *************** **@posting.goog le.com...
<snip>
This calendar pops up on the click of a gif image.
Sometimes.
But the problem is that this poped up window is not modal
in nature(i do not want the user to go the parent page
unless he selects some date in the calendar popup).
Even if the window was modal (including showModalDialog windows) it
would (and should) still be possible for the user to close it and return
to the parent without making a selection.
In the javascript calendar.js he has used window.open()
function to pop up the window. i just want to know whether
we have any attribute which when set to yes will make the
window behave modal in nature.(just like resizable="yes" ,
toolbar="yes ", do we have modal="yes" ?)
No, the new browser instance that is one of the possible results of a
call to the window.open function is a separate process and is not modal
in nature and there are no window features list options that will make
it so. "dependent" (where implemented) comes closest with some browsers
but is so inconsistently implemented that it is probably best just to
leave that alone.
i checked modal="yes" and it does not make the window behave
modal in nature. Am i using the wrong attribute name?(modal="ye s").
You can make up as may feature keys as you like, if they don't appear in
the documentation they are unlikely to do anything but harm.
Do we have such attribute.
No.
If not what are my other options.
1.Attempt to script the new window into a (pseudo) modal window by
monitoring the blur and focus events on all elements in each window so
that re-focusing the original window (or any of its contents) results in
the focus being passed back to the new window. This may sound like a
simple option but in reality is quite tricky to do well and has been
done badly in the past with sufficient frequency that recent browsers
are including user options to prevent scripts from actively focusing
window, so ultimately it can no longer be done reliably anyway. (not
that opening pop-up window can be done reliably anyway).

2.Re-design the process until the perceived need for the window to be
modal goes away (so it will not matter that it cannot reliably be made
so).

3.Navigate the current window to the calendar page, thus making
simultaneous interaction with the first page impossible.

4.Use an "in window pop-up" (DHTML) for the calendar instead of the new
window.
I know that we can use window.showModa lDialog(),
It is an IE only feature so it would be inappropriate to use it on the
internet, at least without writing such a lot of fall-back code for
non-IE browsers that it would be easier to just use the
non-showModalDialog code for all browsers.
but i need to modify the window.open() function to
make the window behave modally. Is it possible to
do so?


If you put enough effort into the blur/focus script and think through,
and test, all of the possibilities then maybe. I would go with the "in
window pop-up" for that type of UI component if I wanted the modal
dialog effect, and navigating the current window if I wanted absolute
reliability.

Richard.
Jul 20 '05 #2

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

Similar topics

2
6521
by: Matt | last post by:
I reposted this question because I really want to accomplish this task. Please advise!! I want to post the form data (http://server/page1.asp) to a modal dialog window (http://server/modaldialog.asp) with a desired height 200px by width 200px. Here's my attempts and problems:
2
3884
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new window. But I want modal dialog window, any ideas?? <form action="page2.asp" method="post" target="_blank"> <input type="text" name="username"> <input type="submit" name="submit"> </form>
1
3373
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of normal window. Actually, I tried to close the parent window from the child modal window using parent.close syntax in onload event in child modal window. It actually closes the parent modal window, but the child modal window is not opened, why it is...
6
9949
by: Ramanand.K | last post by:
var docCal function hello() { winCal= window.open("",null,"toolbar=0,status=0,menubar=0,fullscreen=no,width=195,he ight=245,resizable=0,top="+cnTop+",left="+cnLeft); docCal = winCal.document; RenderCal(); }
10
4312
by: CyberBless | last post by:
I have a page that opens a child window using window.open(...). How do I make so that when that child window opens you cannot get the focus back on the parent window unless you close the child window? Is it even possible?
1
3577
by: John | last post by:
Hi, I'm having a problem opening / downloading csv files when called from a page opened with window.showModalDialog( ). To isolate this problem, I've written 3 files (see below). 1. main.htm allows the user to open the page containing the link in a regular window or one opened via window.showModalDialog( ) 2. modal.htm provides a link to the aspx which generates the csv 3. csv.aspx generates a csv file
2
4397
by: John | last post by:
Hi, I posted this earlier in microsoft.public.dotnet.framework.aspnet, but didn't get a response, so I thought I'd try here. Basically, I'm having a problem opening / downloading csv files when generated from within a page opened with window.showModalDialog( ) ( IE6 ). To isolate this problem, I've written 3 files (see below). 1. main.htm allows the user to open the page containing the link in a
1
2199
by: Laurahn | last post by:
Hi: i'm using modal window (showmodelessdialog) on asp. when the object is created i used session variables. After the object is closed the data is remaining on the modal window when is open again, even if i clear all session variables. i call the modal windows as: Response.write("<script>window.showModelessDialog('myPage.aspx','window', 'center:Yes;help:No;status:false;dialogWidth:740px;dialogHeight:395px')</script>")
20
2008
by: Prisoner at War | last post by:
Hi, People, Is it possible to have an "empty" or "dummy" <a href***without*** the browser jumping back up the page?? I have a hyperlink that doesn't point to another document, but is used to call forth a modal window onClick (or is there another way, without text or image links, of calling forth JavaScript on user activity??). I would like to spare my visitors the inconvenience and visually jarring effect of getting thrown back up to...
1
9984
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9851
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
8863
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...
1
7401
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
6662
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
5293
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
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
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
3
2811
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.