473,246 Members | 1,423 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,246 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 1501
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.