Log in

View Full Version : DHTML-windows are not good enough pop-up window replacements



molendijk
08-01-2012, 05:46 PM
(This may not be the right place to post this message; perhaps I should have used my blog. But that would have meant that another person's recent post which has been in the blog section for only a week now would be replaced by another post).
Follow the steps below (also) using Internet Explorer, Google Chrome or Opera:
1. Go to https://www.google.com.
2. In the same window, go to http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm (no new tab!).
3. Close window #2 (top left), because it's in the way.
4. Under the text Window #1 (iframe content), click on Change Window's URL to CSS Drive.
5. In the new dhtml window, move the mouse over Gallery, then click on Two columns.
6. Move the mouse over Gallery again, then click on Three columns.
7. Move the mouse one more time over Gallery, then click on Mixed cols and rows.
8. Close window#1 (!!!).
9. Go back using the browser's back button. Not less than 4 clicks on the browser's back button are needed to bring you back to https://www.google.com, although you visited http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/ only once.

This shows that closing the dhtml window does not update the window's history, implying that an iframe (such as DD's DHTML Window widget) is not an appropriate pop-up window replacement.
===
Arie Molendijk.

jscheuer1
08-02-2012, 05:03 PM
Is there any reason why you put this in the lounge as opposed to the bug reports section?

Anyways, I would agree to a point. It's just that it works fine for lots of applications. Many people gleefully surf the net never using their browser's back button. And there are many occasions on the net where that button doesn't work as expected or desired, so this is just another one of those cases.

In a similar way, popup windows have drawbacks, albeit different ones.

If you must have content from another domain, which is a sort of plagiarism anyway unless you have permission or own the rights to the other domain, the ideal solution would be to fetch the markup via PHP or other server side code and then do with it what you will.

But the honest way (when you don't explicitly have the rights to it) to reference another site's content is simply to have an ordinary link to it.

And now I'm wondering. Many third party widgets like ads, social media link widgets, weather widgets, etc. use iframe. Do they also mess up the history stack?

molendijk
08-02-2012, 05:53 PM
Is there any reason why you put this in the lounge as opposed to the bug reports section?
Yes, because it's not a bug, just a general history stack issue related to the use of iframes that have a 'close button'.

If you must have content from another domain, which is a sort of plagiarism anyway unless you have permission or own the rights to the other domain, the ideal solution would be to fetch the markup via PHP or other server side code and then do with it what you will.
I agree.

But the honest way (when you don't explicitly have the rights to it) to reference another site's content is simply to have an ordinary link to it.
Yes, or, if we want to use an iframe: put the other site's URL on top of the iframe

And now I'm wondering. Many third party widgets like ads, social media link widgets, weather widgets, etc. use iframe. Do they also mess up the history stack?
Yes, they manifest the behavior I described in my post IF THEY ARE CLOSED OR HIDDEN at a certain point. But most of the time, the iframe used in the widgets don´t have a close button, so you won´t notice. Anyhow, clicking on several links (normal hrefs) in an iframe and then using the browser´s back button equals to going forth and back within the iframe, not within the main window. That's the whole point.
===
Arie.

jscheuer1
08-02-2012, 06:15 PM
In that case I completely agree with your point. It is an inherent drawback of iframe. I also stand by my observation that the DD script is still useful for all sorts of things and that this problem amounts to no more than a common inconvenience shared by many other pages. To wit, one cannot always rely upon the browser's back button to behave as expected/desired.

Most if not all modern browsers now have a feature I just recently discovered and that is useful in many situations like that. When clicking on the back button, if instead of a full click you do only a mousedown, you get a drop down of the history stack. With the mouse button still held in the down position you can point at the item in the stack you want, release the mouse button and it will navigate to that page. If you don't see anything you want in the drop down, you simply release the button outside the drop down and then click anywhere neutral or on the back button and the drop down goes away. Then you're back to exactly where you were (still on the current page) before you clicked on it.

If I have, people will catch on if they haven't already - I'm not usually the fastest to notice new things like this. I'm pretty sure it's been around for awhile.

molendijk
08-02-2012, 06:29 PM
Most if not all modern browsers now have a feature I just recently discovered and that is useful in many situations like that. When clicking on the back button, if instead of a full click you do only a mousedown, you get a drop down of the history stack.
That's new to me. Thanks!
===
Arie.