Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > looking to reproduce div popup behavior

Reply
Thread Tools

looking to reproduce div popup behavior

 
 
Bosconian
Guest
Posts: n/a
 
      04-14-2006
I'm looking to reproduce the div popup behavior like vBulletin's search
link:

http://www.vbulletin.com/forum/

I've looked at many examples, but most are complicated and/or convoluted
menu systems.

I simply want to enable a small div window containing a form with a text
input field and submit button. If the user clicks outside of the div window,
it closes.

I have already created the div containing the form. The div's default style
definition contains 'display:none' to initially hide it.

I'm now looking for a JavaScript function to enable the aforementioned
functionality.

Can someone recommend an existing function or at least point me to an
example? Thanks!


 
Reply With Quote
 
 
 
 
petermichaux@gmail.com
Guest
Posts: n/a
 
      04-14-2006
Hi,

Unless you want to get into some event listener stuff it is probably
easier just to have a close button inside your form to make the div
disappear.

<div id="my_popup_div" style="display:none;">
form stuff here
<span style="cursorointer;"
onclick='document.getElementById("my_popup_div").s tyle.display="none";'>close</span>
</div>
<span style="cursorointer;"
onclick='document.getElementById("my_popup_div").s tyle.display="block";'>open</span>

Is that good enough? If not, are you using any JavaScript libraries
that have some event listener stuff? Yahoo! UI event library?

Peter

 
Reply With Quote
 
 
 
 
Bosconian
Guest
Posts: n/a
 
      04-14-2006
<> wrote in message
news: oups.com...
> Hi,
>
> Unless you want to get into some event listener stuff it is probably
> easier just to have a close button inside your form to make the div
> disappear.
>
> <div id="my_popup_div" style="display:none;">
> form stuff here
> <span style="cursorointer;"
>

onclick='document.getElementById("my_popup_div").s tyle.display="none";'>clos
e</span>
> </div>
> <span style="cursorointer;"
>

onclick='document.getElementById("my_popup_div").s tyle.display="block";'>ope
n</span>
>
> Is that good enough? If not, are you using any JavaScript libraries
> that have some event listener stuff? Yahoo! UI event library?
>
> Peter
>


This should get me particially there--thanks.


 
Reply With Quote
 
Bosconian
Guest
Posts: n/a
 
      04-21-2006
"Bosconian" <> wrote in message
news:. ..
> I'm looking to reproduce the div popup behavior like vBulletin's search
> link:
>
> http://www.vbulletin.com/forum/
>
> I've looked at many examples, but most are complicated and/or convoluted
> menu systems.
>
> I simply want to enable a small div window containing a form with a text
> input field and submit button. If the user clicks outside of the div

window,
> it closes.
>
> I have already created the div containing the form. The div's default

style
> definition contains 'display:none' to initially hide it.
>
> I'm now looking for a JavaScript function to enable the aforementioned
> functionality.
>
> Can someone recommend an existing function or at least point me to an
> example? Thanks!
>
>


This is just a quick follow-up to my original post.

I have discovered a few useful links that provide information regarding
dynamic popups.

The first is probably the best known and most popular, overlib:

http://www.bosrup.com/web/overlib/

The second is a simple and limited example, but provides the core
functionality without the bloat:

http://www.dynamicdrive.com/dynamici...tmltooltip.htm

The third provides the same features as overlib, by weighs in at a fraction
of the size:

http://migoicons.tripod.com/dhtips.htm




 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      04-21-2006
Bosconian said the following on 4/21/2006 3:55 PM:
> "Bosconian" <> wrote in message
> news:. ..
>> I'm looking to reproduce the div popup behavior like vBulletin's search
>> link:
>>
>> http://www.vbulletin.com/forum/
>>
>> I've looked at many examples, but most are complicated and/or convoluted
>> menu systems.
>>
>> I simply want to enable a small div window containing a form with a text
>> input field and submit button. If the user clicks outside of the div

> window,
>> it closes.
>>
>> I have already created the div containing the form. The div's default

> style
>> definition contains 'display:none' to initially hide it.
>>
>> I'm now looking for a JavaScript function to enable the aforementioned
>> functionality.
>>
>> Can someone recommend an existing function or at least point me to an
>> example? Thanks!
>>
>>

>
> This is just a quick follow-up to my original post.
>
> I have discovered a few useful links that provide information regarding
> dynamic popups.
>
> The first is probably the best known and most popular, overlib:
>
> http://www.bosrup.com/web/overlib/
>
> The second is a simple and limited example, but provides the core
> functionality without the bloat:
>
> http://www.dynamicdrive.com/dynamici...tmltooltip.htm
>
> The third provides the same features as overlib, by weighs in at a fraction
> of the size:
>
> http://migoicons.tripod.com/dhtips.htm


And this one:

<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >

Beats them all.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
optimistx
Guest
Posts: n/a
 
      04-22-2006

"Randy Webb" <> kirjoitti viestissä
news:. ..

....
> And this one:
>
> <URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >
>
> Beats them all.


....

Thanks for the link. It is an interesting set of pages. At first glance I
did not find any license agreement, download instructions, documentation of
the code. Is this supposed to be ready to be copied and used by anyone for
any purpose?


 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      04-23-2006
optimistx said the following on 4/22/2006 2:11 AM:
> "Randy Webb" <> kirjoitti viestissä
> news:. ..
>
> ....
>> And this one:
>>
>> <URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >
>>
>> Beats them all.

>
> ....
>
> Thanks for the link. It is an interesting set of pages. At first glance I
> did not find any license agreement, download instructions, documentation of
> the code. Is this supposed to be ready to be copied and used by anyone for
> any purpose?


You would have to ask Richard Cornford about that, it is his code.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone else reproduce this WinXP Home WPA2-PSK AES WZC bug? Sharon Wireless Networking 3 07-05-2008 09:59 AM
why can i still able to reproduce the SimpleHTTPServer bug which issaid fixed 3 years ago? Leo Jay Python 0 06-13-2008 07:02 AM
Trying to reproduce a table layout with CSS Deryck HTML 5 10-10-2004 11:58 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
databind in datalist does not reproduce html source New User ASP .Net 0 01-07-2004 01:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57