Scotmk Posted September 11, 2007 Posted September 11, 2007 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
Lithium Posted September 11, 2007 Posted September 11, 2007 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. 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 [url="javascript:ShowLayer('mydivid');"]text[/url] then just have a content there's probably a better way of doing it... but where I've used this before it's been really well appreciated... by staff :|
Lithium Posted September 12, 2007 Posted September 12, 2007 I neglected to mention that it needs to be 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now