Web Development Thread, Popup or Alt Tag title in Coding and Web Development; Hi
I need to have a some links on the content pages that either open up a popup or a ...
-
11th September 2007, 01:48 PM #1 Popup or Alt Tag title
Hi
I need to have a some links on the content pages that either open up a popup or a hidden layer which then has a desciption in the box, either to be closed when finished.
I have tried using the title box (alt tag properties) in the link options which work, but only stays on the screen for about 4-5 seconds.
I am using the new joomla system from here. It also needs to be usable be non technies so not custom changes, as will be updated by other staff. and I really dont want to create a new page for each of these as maybe updated all the time.
HELP!
Thanks
Thanks
-
-
IDG Tech News
-
11th September 2007, 04:48 PM #2
- Rep Power
- 11
Re: Popup or Alt Tag title
Under Dreamweaver 9, part of the SPRY framework is a thing called "Lightbox" which covers the screen with something... never used, just saw it in a magazine...
For stuff where I want to show additions - the best way (my opinion) is to avoid using popups etc - it can't be filtered by popup blockers then...
So I use Div's and a bit of javascript to show or hide it.
Code:
function ShowLayer( whichLayer ){
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style; // if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'block';
vis.display = (vis.display==''||vis.display=='block')?'block':'block';
}
function HideLayer( whichLayer ){
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style; // if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'none':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'none';
} Then just call it as a URL
then just have a <div id=mydivid> content </div>
there's probably a better way of doing it... but where I've used this before it's been really well appreciated... by staff :|
-
-
12th September 2007, 10:51 AM #3 Re: Popup or Alt Tag title
Thanks, I will try and have a go.
-
-
12th September 2007, 05:12 PM #4
- Rep Power
- 11
Re: Popup or Alt Tag title
I neglected to mention that it needs to be
Code:
<div id=mydivid style="display: none">
to be hidden, or show to be shown by default - some browsers are a bit nit picky about using the display style without it being there.
-
SHARE:
Similar Threads
-
By Samson in forum Scripts
Replies: 7
Last Post: 6th May 2008, 12:21 AM
-
By browolf in forum Windows
Replies: 3
Last Post: 12th March 2007, 05:05 PM
-
By Kyle in forum How do you do....it?
Replies: 3
Last Post: 27th August 2006, 12:00 PM
-
By tosca925 in forum How do you do....it?
Replies: 6
Last Post: 16th October 2005, 03:06 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules