Need To Pop Up an Inline DIV -- Can You Help?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
supermike
Forum Contributor
Posts: 193
Joined: Tue Feb 28, 2006 8:30 pm
Location: Somewhere in the Desert, USA

Need To Pop Up an Inline DIV -- Can You Help?

Post by supermike »

Okay, I can use jQuery to load my form into a DIV (complete with Captcha) on a mouse click. The catch is that background dimmer thing like you see with Lightbox. Does anyone know how to dim the entire page before my inline DIV (which shows a form) appears? Does your source code work across all the browser types -- FF2, FF3, Safari, Opera, IE6, and IE7?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by pickle »

Why not take a look at the sourcecode for some lightbox scripts?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by JAB Creations »

Mike, at the top right of my site click on either 'Site Options' or 'Site Themes'.

http://www.jabcreations.com/blog/
supermike
Forum Contributor
Posts: 193
Joined: Tue Feb 28, 2006 8:30 pm
Location: Somewhere in the Desert, USA

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by supermike »

Once I saw how small the sourcecode was for Thickbox for jQuery, I was completely impressed. So, we're going to use that. I also tested on a fresh install of XP with IE6 (un-service-packed on purpose) and it worked there as well, surprisingly.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by JAB Creations »

Wow...ok I presume you don't know much about browsers. SP2 added security features around IE6, nothing more. IE6 without a service pack and IE6 with SP3 are the exact same as far as rendering is concerned.

Also a framework to achieve that is a total waste.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by pickle »

JAB Creations wrote:Also a framework to achieve that is a total waste.
Not sure I agree with that 100%. If it saves hours and hours of development time for an internal app, then it's worth it.

If you are building a public-facing app/website & you're including jQuery in your scripts for the sole purpose of doing that thickbox thing, then do your users a favour & find an implementation that doesn't involve a framework. ~JAB is correct (assuming this was his opinion) that a framework for just that one thing is overkill. It will slow down page loads for the users (albiet for most people it'll be unnoticeable) and similarly increase your bandwidth bill.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by JAB Creations »

This particular goal requires less than a kilobyte easily.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by JAB Creations »

JavaScript

Code: Select all

function change(id, newClass) {identity=document.getElementById(id); identity.className=newClass;}
XHTML

Code: Select all

<a href="javascript&#058; change('element_id', 'show_layer');">show layer</a>
supermike
Forum Contributor
Posts: 193
Joined: Tue Feb 28, 2006 8:30 pm
Location: Somewhere in the Desert, USA

Re: Need To Pop Up an Inline DIV -- Can You Help?

Post by supermike »

JAB Creations wrote:Also a framework to achieve that is a total waste.
Agreed. But we're only using that framework on pages where this form is necessary. It won't load on the other pages. I'm also tired of wasting a lot of time on this low budget project, so I'm looking for quick ways to conclusion.
Post Reply