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

DHTML Popups Explained

Hello,

I just finished a tutorial website regarding the development of DHTML
popups. The site features several examples with downloadable samples.
It also feature more complex effects like drop-down popups, fade
in/out, slide in etc.

The URL is: http://dhtmlpopups.webarticles.org/

I hope you will find the information useful. Any feedback is welcomed
:)

Thanks,
Ciprian

Sep 4 '06 #1
4 1507
ci**************@gmail.com said the following on 9/4/2006 8:25 AM:
Hello,

I just finished a tutorial website regarding the development of DHTML
popups. The site features several examples with downloadable samples.
It also feature more complex effects like drop-down popups, fade
in/out, slide in etc.

The URL is: http://dhtmlpopups.webarticles.org/

I hope you will find the information useful. Any feedback is welcomed
:)
<quote>
The first issue is that now the popup cannot be closed
</quote>

That is a trivial problem to fix. You simply add an "X" image with an
onclick that does a this.parentNode.style.display="hidden"

But, all in all, this site is a better example of in window popups:

<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html>
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 4 '06 #2
ci**************@gmail.com wrote:
I just finished a tutorial website regarding the development of DHTML
popups. The site features several examples with downloadable samples.
It also feature more complex effects like drop-down popups, fade
in/out, slide in etc.
The URL is: http://dhtmlpopups.webarticles.org/
I hope you will find the information useful. Any feedback is welcomed
I just skimmed it, but I have a couple comments:
>document.getElementById("mypopup").style.top = topOffset + "px";
document.getElementById("mypopup").style.left = leftOffset + "px";
document.getElementById("mypopup").style.displa y = "block";
Especially in code where execution speed is important, doing repeated calls
to document.getElementById is very wasteful. Instead, get a reference to the
object in a local variable.
>var ie = document.all;
var nn6 = document.getElementById &&! document.all;
This just screems out "bad code". I can assure you that the existence of
document.all does not mean the browser is IE.
See http://www.jibbering.com/faq/faq_not...tect.html#bdOI
>The same note goes for dropdown lists (<select>) in HTML forms. Disabling
their visibility is the only workaround I'm aware of at the moment.
Placing an iframe object behind the popup will hide controls that don't
honor z-index values.

See also my example page for in-page div popups:
http://www.javascripttoolbox.com/lib/popup/example.php

I'm working on the code now to get rid of memory leaks (it currently leaks
terribly in IE due to closures and DOM objects) but it will soon be ready as
a stand-alone lib to easily and quickly create these kinds of popups.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 4 '06 #3
Thanks Randy and Matt for your feedback and suggestions, I was aware of
most of them but wanted to put emphasis strictly on the topic, however,
after second thoughts there I have better options to express my points
and to keep the code optimized, not just educational.

Randy, just a single note:
</quote>
The first issue is that now the popup cannot be closed
</quote>

That is a trivial problem to fix. You simply add an "X" image with an
onclick that does a this.parentNode.style.display="hidden"
If you'd have checked the next lesson you'd realised where was my
point. I split the topic in several parts, focusing separately in each
lesson (and closing the popup was explained few clicks away).

Thanks again for your constructive feedback and I'll take your
suggestions in account ASAP,
Ciprian

Sep 4 '06 #4
ci**************@gmail.com wrote:
Hello,

I just finished a tutorial website regarding the development of DHTML
popups. The site features several examples with downloadable samples.
It also feature more complex effects like drop-down popups, fade
in/out, slide in etc.

The URL is: http://dhtmlpopups.webarticles.org/

I hope you will find the information useful. Any feedback is welcomed
:)
The font and background colours for you code blocks makes the code very
hard to read.

You could consider making the pop-up a single object with all the
functions added to its prototype as methods.

--
Rob
Sep 4 '06 #5

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

Similar topics

52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
2
by: Tom Szabo | last post by:
Hi, >>IE in Windows XP Service Pack 2 has a popup blocker that blocks unsolicited >>popups >>IE (other than Windows XP Service Pack 2) also has many add-ons (Google toolbar, >>Yahoo! toolbar,...
6
by: Terry | last post by:
Hi, I like the DHTML-based pop-up window script made available by this company. However, their script only works under the quirk mode for IE 6 and Firefox. http://www.ferant.com I wonder...
1
by: Eric Whalen | last post by:
"Discover the Breakthrough Popup Technology that Can Drive Your Website Profits Through the Roof!" Are You Ready to Enjoy a Massive Surge in Sales, Commissions and Subscribers using...
4
by: bbass | last post by:
thanks to all that replyied to my previous post with the following code in question: <a href="merc.htm" target="_new_merc" onfocusout=window.close class="left_link"> i understand that the...
3
by: Jason Gleason | last post by:
How can i make msn messenger style popups (like alerts/when someone messages you for the first time - the little box that appears in the bottom right hand corner of your screen) with c#?
3
by: aspmonger | last post by:
Hello, I really believe that IE 6 has a new (intentional?) bug that severely limits the capability of dhtml and cross domain scripting. Yesterday, I read an interesting article about the subject and...
1
by: YotamElal | last post by:
Hello, I have a popup problem. When a popup is opened, I want all other popups to close immediatly. (except for its self and it's child popups) Here is my code: code: <!DOCTYPE HTML PUBLIC...
1
by: Moe Sisko | last post by:
Using : ASP.NET 2.0, IE 7. This is a strange problem with popups not working in IE to remote sites, even though popups are allowed in IE. To reproduce, create web site with two pages,...
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
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...
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
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...
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,...

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.