473,406 Members | 2,620 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,406 software developers and data experts.

Controlling Page Stack Using IE6

35
My client-side application works reliably and as intended in Firefox, but not in IE6. The problem seems to be that I do not have control over the page stack in IE, while I do in Firefox. So far I have not figured out how to use “focus” to assure proper page sequencing.

Here is an overview of my client-side application. There are 6 screens that capture user-entered data. Screen 1 opens 2, which opens 3, which opens 4, which opens 5, which opens 6. Each screen requests the user to enter data before moving to the next screen. Data validation prevents moving to the next screen if errors are found or a required field is skipped. Each screen opens the subsequent screen by pressing the NEXT button. When the NEXT button is pressed, that screen is not closed, but stays open holding the data that was entered.

When screen 6 is reached, there is no NEXT button, because there is no screen following it. In place of a NEXT button, screen 6 shows a SAVE button. After data entry and validation in screen 6, pressing the SAVE button causes screen 6’s data to be passed to its parent (screen 5) and screen 6 is closed. Closing screen 6 leaves screen 5 showing at the top of the stack. Screen 5 now shows only a SAVE button (replacing the previously used NEXT button). Pressing the screen 5 SAVE button passes all data in 5 to 4 and closes 5, leaving 4 showing at the top of the stack. SAVE buttons are used for screens 4, 3, and 2 to move their respective data to screen 1, which at the end of the process is the only one remaining open. At that point a REPORT button appears to initiate reporting based on the data passed to 1 from screens 6, 5, 4, 3, and 2.

The reason that Firefox seems to control the stack properly is that when the NEXT button is pressed, Firefox opens each subsequent screen in a new tab. Thus when pressing the screen 6 SAVE button, 6 is closed and 5 immediately appears from behind it.

In contrast to Firefox, IE6 opens each screen in separate windows, not tabs. When pressing the screen 6 SAVE button, screen 5 is not always the next screen in the stack to appear, or if it is, then its parent (screen 4) is not always behind it in the stack.

What occurs to me are these possibilities:
(a) control the stack order so that it is always 6, 5, 4, 3, 2, 1; control by use of “focus” or some other javascript technique;
(b) make the screens open in IE in tabs so that the desired order is obtained (this assumes IE and Firefox would use tabs in the same manner);
(c) something else someone more experienced would suggest.

TIA for any ideas that work!!
Nov 20 '07 #1
13 1613
acoder
16,027 Expert Mod 8TB
Since you're opening new windows, window.opener should refer to the parent window.
Nov 20 '07 #2
trbjr
35
Yes, window opener refers to each window's parent. Window 1 is parent to 2, 2 parent to 3, etc. Because of that relationship, things work fine in Firefox, but not in IE6.
Nov 20 '07 #3
acoder
16,027 Expert Mod 8TB
If you try with fewer windows, does that work?

It may be a memory bug in IE6.

Personally, I prefer to avoid popup windows wherever possible. You could achieve the same functionality using DHTML (show and hide divs).
Nov 20 '07 #4
trbjr
35
I have not tried fewer windows. That would mean rewriting the whole application or else supporting multiple versions by browser.

I don't know DHTML at present, so I don't appreciate your suggestion of using the DIV tag. Does that mean you can make sections of your code occupy the same screen space, depending if it is visible or not? If so, it seems to me there must be reference points for the screen space to assure that the visible code stays where needed. Is that correct?
Nov 20 '07 #5
acoder
16,027 Expert Mod 8TB
Does that mean you can make sections of your code occupy the same screen space, depending if it is visible or not? If so, it seems to me there must be reference points for the screen space to assure that the visible code stays where needed. Is that correct?
You only need to set the position of the divs. If you set the 'left' and 'top' properties, they will be displayed at the required positions.
Nov 20 '07 #6
trbjr
35
Thanks for the DIV tag reply. I will have to study how that works.

[Quote by Acoder] It may be a memory bug in IE6. [/quote]

Should I infer from the above remark you made that using "window.opener" should assure the right page order in the stack?

Also, do you know if there is a way to programatically cause a window to open as a tab rather than a separate window?
Nov 20 '07 #7
acoder
16,027 Expert Mod 8TB
Should I infer from the above remark you made that using "window.opener" should assure the right page order in the stack?
It should do as far as I'm aware (unless you've discovered a new bug!)
Also, do you know if there is a way to programatically cause a window to open as a tab rather than a separate window?
I'm afraid not. This is a browser issue which JavaScript has no control over. In any case, I don't think IE6 supports tabs.
Nov 20 '07 #8
trbjr
35
It should do as far as I'm aware (unless you've discovered a new bug!)
I'm afraid not. This is a browser issue which JavaScript has no control over. In any case, I don't think IE6 supports tabs.
Well, thanks for taking the time to have this conversation. I don't know yet what I am going to do other than indicate a preference for Firefox over other browsers.

I guess there is nothing more to do with this thread, unless someone else jumps in with other ideas.

I appreciate your help and insights.
Nov 20 '07 #9
gits
5,390 Expert Mod 4TB
hi ...

a browser preference wouldn't really solve the problem :) ... i know that it is easy to say: 'recode your application' but i think the solution to prefer would be the DIV-solution that acoder already propsed. it is quite simple to create 6 divs at one page that contain all of the 6 seperate window-contents you already have. now you could use the css-property 'display: none' for div 2 to 6 and only div 1 is displayed at the page. now we could create a javascript toggle function that switches the visibility of the corresponding div the way you need it and it would result in a 'one-page-layout' that also would be a little bit better to handle then a multiwindow layout ... in case you want to give that a try post back and we may help you with that ...

kind regards
Nov 20 '07 #10
acoder
16,027 Expert Mod 8TB
In case you needed more convincing:
  1. Less memory-intensive
  2. No need to worry about popup blockers
  3. No need to worry about 'lost' or accidentally closed windows (resulting in undefined errors)
  4. Get rid of this IE6 bug in one fell swoop
  5. Self-contained
  6. Not too difficult to recode - just place the body code into each div (making sure no ids clash) and the rest appears in the head section
Nov 21 '07 #11
gits
5,390 Expert Mod 4TB
In case you needed more convincing:
  1. Less memory-intensive
  2. No need to worry about popup blockers
  3. No need to worry about 'lost' or accidentally closed windows (resulting in undefined errors)
  4. Get rid of this IE6 bug in one fell swoop
  5. Self-contained
  6. Not too difficult to recode - just place the body code into each div (making sure no ids clash) and the rest appears in the head section
:) that should convince everybody ...
Nov 21 '07 #12
trbjr
35
hi ...

a browser preference wouldn't really solve the problem :) ... i know that it is easy to say: 'recode your application' but i think the solution to prefer would be the DIV-solution that acoder already propsed. it is quite simple to create 6 divs at one page that contain all of the 6 seperate window-contents you already have. now you could use the css-property 'display: none' for div 2 to 6 and only div 1 is displayed at the page. now we could create a javascript toggle function that switches the visibility of the corresponding div the way you need it and it would result in a 'one-page-layout' that also would be a little bit better to handle then a multiwindow layout ... in case you want to give that a try post back and we may help you with that ...

kind regards
Thanks to GITS and ACODER for your most recent replies (yesterday and today).

1. Yes, I am interested to learn how to use the DIV tag along the lines you suggest above. So I do appreciate the plan outlined by you both. I will try to work on that as time permits. I agree with the concept, because there is a lot of "window.opener" code that could be dropped from my present scheme. So when done, things should be simpler.

2. Time is of the essence due to upcoming holidays, other commitments, and the fact that in January the application must be used. So I will not be able to install the DIV solution until a future version of the application.

3. I can report that yesterday afternoon I learned how to use the "focus()" method in my project with the result that the application now works in IE6 as well as it does in Firefox.

4. Some months ago GITS recommended using Javascript, the Definitive Guide by David Flanagan. It proved very helpful in rethinking my code and getting it to work. Part of my difficulty is getting the right perspective when working with the different screens. So in this case there is no IE6 bug that I stumbled over. Rather it was my inexperience with javascript and object oriented programming that blinded my initial effort. Basically, I just had to find the right place and time to invoke the focus method.

Having said all the above I do wish to thank you both strongly for you patience and willingness to help an inexperienced and newcomer to the world of javascript programming. I much appreciate you both!!
Nov 21 '07 #13
acoder
16,027 Expert Mod 8TB
3. I can report that yesterday afternoon I learned how to use the "focus()" method in my project with the result that the application now works in IE6 as well as it does in Firefox.
Oh, just a focus() problem. Glad you solved it.
Having said all the above I do wish to thank you both strongly for you patience and willingness to help an inexperienced and newcomer to the world of javascript programming. I much appreciate you both!!
No problem and good luck with the rest of your project.
Nov 21 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
1
by: ScottF | last post by:
There was a problem with ASP.Net 1.1 creating/generating bad javascript on html pages that I ran into and on the KB page that I had found at the time it said that the problem was fixed in the .Net...
8
by: Lars-Erik Aabech | last post by:
Hi! I've got an asp.net page that works for all users except one and that one user only gets the error with a certain parameter set to a certain value. (Same value as the others, but for this...
5
by: Patrick | last post by:
I understand it is built in behaviour that if an ASP.NET's web.config is set to: <customErrors mode="RemoteOnly" /> then I only get a detailed error message on screen when the ASP.NET...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
7
by: Abubakar | last post by:
Hi, I'm viewing this stack overflow help page ( http://support.microsoft.com/kb/315937 ) at the ms support site. I cant say I understand the concept of a "page" the way its used in this...
3
by: Herb | last post by:
I've found how to use javascript to embed a Windows Media Player in a web page. How do I go about controlling the player in response to user input? There should be calls to start, stop and also...
2
by: dm3281 | last post by:
Hi all -- I have a strange issue. I have obtained a scripted database and compiled ASP.NET 2.0 application from a sister site that I'm trying to implement locally. I have successfully...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
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...
0
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,...
0
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...

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.