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

Show Subwindow

Hi All,

I have got two windows namely parent and a child .

My parent window has got a link, on clicking which opens a child window(i am
using window.open function).

I do the following set of operations

In my parent window i click the link which results in popping up the child
window,
now i will minimize this child window and will click the link in parent
window again,
this time the child window will not popup(maximizes), it sits on the tray in
minimized
position.

Can anyone suggest me how to make child window show in maximized form when i
click
the link in parent window for the second time.

Here is the piece of code i am using for the same.

<a style='text-decoration:none'
href="javascript:showSubWindow1('ChildWindow.asp') ;">
Child Window </a>

<Script language = "JavaScript">

function showSubWindow1(url)
{
subwindow1 = true;
var subwindow = window.open(url,"def1",
"HEIGHT=650,WIDTH=770,SCROLLBARS=YES,RESIZABLE=YES ,status=yes");
}

</Script>

Thanks
Venkat
Jul 20 '05 #1
1 6714
DU
Venkat wrote:
Hi All,

I have got two windows namely parent and a child .

My parent window has got a link, on clicking which opens a child window(i am
using window.open function).

I do the following set of operations

In my parent window i click the link which results in popping up the child
window,
now i will minimize this child window and will click the link in parent
window again,
this time the child window will not popup(maximizes), it sits on the tray in
minimized
position.

Can anyone suggest me how to make child window show in maximized form when i
click
the link in parent window for the second time.

I've answered this question, difficulty at least 20 times in the last 2
years in 3 different newsgroups.

Have a close look to the source code of these pages:

http://www10.brinkster.com/doctorunc...ra702Bugs.html

and

http://www10.brinkster.com/doctorunc...tSAndrews.html

Theory:
http://www10.brinkster.com/doctorunc...seLowerSetting

Your difficulty pinpoints an inherent flaw in the window.open() method
and in the windowing system of current operating systems like windows,
linux, etc.
Here is the piece of code i am using for the same.

<a style='text-decoration:none'
href="javascript:showSubWindow1('ChildWindow.asp') ;">
Child Window </a>

For **many reasons** that I won't explain here, do not use "javascript:"
pseudo-protocol in your href attribute value.

<a href="ChildWindow.asp" onclick="showSubWindow1(this.href); return
false;">Child Window </a>

7. Begin Link Names with the Most Important Keyword
"Links are the action items on a homepage, and when you start each link
with a relevant word, you make it easier for scanning eyes to
differentiate it from other links on the page."
http://www.useit.com/alertbox/20020512.html

So, "Child Window" is not best. "My resume", "My marriage", "My garden"
are good link editions though.
For the best recommendable coding, I recommend given examples you can
find at my homepage.

<Script language = "JavaScript">
type has superseded language and is both backward and forward compatible.

function showSubWindow1(url)
{
subwindow1 = true;
var subwindow = window.open(url,"def1",
"HEIGHT=650,WIDTH=770,SCROLLBARS=YES,RESIZABLE=YES ,status=yes");
}

</Script>
Your subwindow variable must be a global variable. Look in my code for
my variable WindowObjectReference. Also, do not set the height to 650
for several reasons. Basically, cpu, RAM, and time will be wasted on
parsing, adjusting and then resetting such height to something much
smaller on 800x600 scr. res.
Btw, your subwindow1 var does nothing here.
I stronly encourage you to keep
scrollbars=yes,resizable=yes,status=yes
as they are in your code: believe me, your users will not be irritated
by that.

Also,

Ten Good Deeds in Web Design
"8. Use link titles to provide users with a preview of where each link
will take them, before they have clicked on it."
http://www.useit.com/alertbox/991003.html

"Until user agents allow users to turn off spawned windows, do not cause
pop-ups or other windows to appear and do not change the current window
*_without informing the user_*.
(...)if your link spawns a new window, or causes another windows to "pop
up" on your display, or move the focus of the system to a new FRAME or
Window, then the nice thing to do is to tell the user that something
like that will happen."
W3C Web Accessibility Initiative Checkpoint 10.1
http://www.w3.org/WAI/wcag-curric/sam77-0.htm

That's why more and more sites (Microsoft, Sun Microsystems, WAVE 3.0,
accessibility sites, J. Nielsen) use and/or recommend to use the title
attribute and/or an image icon clearly indicating that clicking this
link will open a new window (sub-window).

If you need more, just check recent posts I did in this newsgroup and in
alt.html on this whole issue.
Thanks
Venkat


DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/

Jul 20 '05 #2

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

Similar topics

77
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a...
3
by: dp | last post by:
I am new to VB.NET and I have a simple question. How do I show a form from a command button click event? The code I have below is not working. I am trying to show the form frmAgent. What am I...
2
by: Ajai Kumar .R | last post by:
Hai all, I've two or more forms on my app. My requirement is, Have to show the first form asa the user press a button have to hide the first form and show the second form. If the user press the...
1
by: Marcel | last post by:
I have a subwindow hich displays a grid. When the user selects a row from the grid, I wish to store the selected row ID in session state and close the subwindow, returning focus to the parent...
6
by: Wolf Grossi | last post by:
Greetings, how to refresh a parent window after processing forms from the subwindow? Currently I have a solution (see below) which works with IE and Konqueror, but not with Firefox, so I...
1
by: Wolf Grossi | last post by:
Greetings, how to refresh or reload a parent window after processing forms from the subwindow? Currently I have a solution (see below) which works with IE and Konqueror, but not with Firefox,...
2
by: nicofari | last post by:
Hi all, I would need to open a "subwindow of a subwindow". From first page (say "main.html") I open a window using javascript window.open('form1.html',...) After that I have two browser...
5
by: digory | last post by:
Hi Our product consists of a complex application that is written in C/C++ and uses the old event-based Win32 API (some code has already been in there in times of Windows 3.11!) We cannot afford...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...
0
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,...
0
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...

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.