Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 02-19-2010, 12:29 PM Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
Just wondering if there is a way to create a custom popup window that is not OS/Browser generated with javascript. Essentially I want to create a window that displays information in an overlay window when a link is clicked while the rest of the page content below is slightly darkened. Is this possible with js? If not, where should I be looking to pull this type of effect off?
Jasonpv is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-19-2010, 12:52 PM Re: Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
Wait, can this be done with css?
Jasonpv is offline
Reply With Quote
View Public Profile
 
Old 02-19-2010, 03:10 PM Re: Custom Popup Window
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Wait, can this be done with css?
Nope.

just lookup "lightbox" in your favourite search engine
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-21-2010, 08:29 PM Re: Custom Popup Window
Novice Talker

Posts: 9
Name: Ivan Castellanos
Trades: 0
Basically you just put the div with position absolute and display none ; and then the javascript will include something like this

function showit() {
window.document.getElementById("theDiv").style.dis play = "block"
}

And the html inside could be...
<a onclick="showit();">Click to show annoying pop up</a>

To hide it again with Javascript you go like this

function hideit() {
window.document.getElementById("theDiv").style.dis play = "none"
}

And then the option to close it inside the "theDiv"
<a onclick="hideit();">X Close</a>
AltIvan is offline
Reply With Quote
View Public Profile
 
Old 02-22-2010, 05:18 PM Re: Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
Great, thanks guys! I think AltIvan's method is closer to how I was thinking of doing this. Will this method gray out the background though?
Jasonpv is offline
Reply With Quote
View Public Profile
 
Old 02-22-2010, 05:29 PM Re: Custom Popup Window
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
something like http://www.candsdesign.co.uk/article...-a-disclaimer/ ?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-22-2010, 08:34 PM Re: Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
I was thinking more like the lightbox look but I need to have content the user can interact with in the window such as a clickable email address and an embedded google map. Lightbox only supports images it seems...
Jasonpv is offline
Reply With Quote
View Public Profile
 
Old 02-22-2010, 08:36 PM Re: Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
If you go here then click on deuce love care notice on the bottom right, this showcases the exact thing I am looking for.

http://deucesport.com/ProductDetails...id=179&cid=123
Jasonpv is offline
Reply With Quote
View Public Profile
 
Old 02-22-2010, 11:51 PM Re: Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
Okay, got it. Below you can see what I was trying to achieve by clicking on about or contact:
http://sigautohomeins.com/

Thanks again for all the help!
Jasonpv is offline
Reply With Quote
View Public Profile
 
Old 02-23-2010, 07:09 AM Re: Custom Popup Window
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use the same code from the link I posted in post #6 that is triggered by a onload event, you simply trigger it with an onclick event instead.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-23-2010, 01:09 PM Re: Custom Popup Window
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
That's exactly what I did. Did you see my link above? That is my end result...
Jasonpv is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Custom Popup Window
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.81575 seconds with 12 queries