Need layer help ASAP please
I am sure someone has asked this before, and believe me I have looked( and looked and looked )and searched( and searched and searched )through this forum, but I just don't see an answer. I actually want to use a layer that opens/is visible when the page it is on opens/loads( without having to manually open it )that you can then close and have it be hidden after reading it. A true popup if you will.
I have a site I do where they need to make emergency announcements from time to time to their members that have to be impossible to miss. I am currently using a simple Javascript popup code that has a message open as the page loads and they have to click OK to continue on. It is very limited though in what you can do with it. I need to be able to add links and even some graphics.
I would like to create a layer with a box and the info that appears on the page when the page 1st opens that the visitor must close/hide manually. That way they can't miss the info. I just can't seem to come up with a way to close/hide a visible layer that is open when the page loads?
Is it possible in WD( I have WD5 btw not WD6 )to have a layer that automatically opens when the page 1st loads/opens that you can add a close button to which will close/hide the layer when you click it?
I would really appreciate any help with this. If it has been covered I apologize. I did look and just couldn't come up with it.
Thank you in advance for any help.
Re: Need layer help ASAP please
Re: Need layer help ASAP please
That doesn't do what I asked I don't think??? Unless I am stupid or something which is definitely possible? rotflmao
I don't want to be required click any buttons to "open" the layer( be visible - it should be there visible when the page opens ). I want to be able to "close" the layer as the only required act( i.e. hide a layer that is visible, automatically, when the page 1st opens ).
This is for the site's home page so the layer needs to be there visible automatically when the site loads with no act required by the visitor. The layer in question should then be able to be closed, or hidden, by the "close" button/text.
Can that be done is the question and if so how? It doesn't appear to me your link does that quite how I need it done. Maybe I am missing something or maybe I just don't understand what is written or shown in the example? What I get out of all that is needing a button to open what you want open and that isn't going to work for me. I can do that without adding special script.
I want a layer that is visible over the main layer(s)when the page 1st opens to hide when you click a "close" button/text. Maybe it can't be done or as said maybe I am slow and just don't get what that link shows??? :think:
Here is an example of what I mean. I did a quick sample page and took a screen shot just to show it so people are sure of what I mean( visually - obviosuly doesn't work ).
I want the home page to open like this( without me having to click any buttons )...
http://i55.photobucket.com/albums/g1...er/visible.jpg
Then click the "close" button or text to have it hide the layer so the page looks like this...
http://i55.photobucket.com/albums/g1...der/hidden.jpg
Re: Need layer help ASAP please
It does, but only in V5.
Any javascript ninjas know how to make this work in V6 ?
Re: Need layer help ASAP please
I have version 5 actually. I guess I just don't understand the How To directions because it sounds like I have to add a button people click on to make it work and that is not what I need?
1 Attachment(s)
Re: Need layer help ASAP please
The button is not there for people to click, it is to enable the placeholder script to work.
In the attached example the button has been made 99.5% transparent
Re: Need layer help ASAP please
You might find what you are looking for here http://www.dynamicdrive.com/dynamicindex8/
There are many of these sites that provide code for that type of pop-up windows.
Do a search you will find a suitable one.
Re: Need layer help ASAP please
Quote:
Originally Posted by
Drwyd
The button is not there for people to click, it is to enable the placeholder script to work.
In the attached example the button has been made 99.5% transparent
YES! That is what I want. In the link given the example pages when viewed( preview )do not do what I want. Your example, previewed, does what I want. THANK YOU! Now I just have to get it to work on my site( I can hide the button in the background/border no problem ).
Thank you again.
Re: Need layer help ASAP please
Re: Need layer help ASAP please
Quote:
Originally Posted by
Drwyd
Glad I could help :D
I can't get it to close for some reason when I do it. It opens with the page whether I have the layer checked visible or hidden but it won't close?
No idea what I am doing wrong here? Your example works perfect. I can't close mine.
HELP
EDIT - Do I need to update my version of WD5 or something for this to work? As said your attached file works fine. I can not make it work if I do it manually in my program however. Copy your stuff and paste into a new project on my system and it fails again???
Says I have version 5.0.2.10712 DL
Re: Need layer help ASAP please
Could you upload a file showing the problem ?
1 Attachment(s)
Re: Need layer help ASAP please
I will try. Give me a minute...
Ok, let's try this. This is not the page it is going on but rather a test page just to try and make it work. If you see what I am doing wrong please tell me what so I know for the future.
Obviously I must be doing something wrong but I have no idea what. I can usually figure this stuff out and have done things much harder( or so I thought )but I am having an awful time with this. I tried to set this test page up the same way you had your sample page setup.
I truly appreciate the help.
1 Attachment(s)
Re: Need layer help ASAP please
Sorted :)
Added missing trigger button (could'nt find it on your example) I have made it 89.5% transparent (top left)
Brought code placeholder to the front. It was probably its position in the exported code that stopped it from working.
Re: Need layer help ASAP please
Quote:
Originally Posted by
Drwyd
Sorted :)
Added missing trigger button (could'nt find it on your example) I have made it 89.5% transparent (top left)
Brought code placeholder to the front. It was probably its position in the exported code that stopped it from working.
That is great. Thank you so much.
1 thing I see right off I was doing wrong was the "trigger button". I thought the black box with the code was the "button". I missed( and still do ) where it said to do that part but now that I know I can work with it.
I will see if I can duplicate this now. THANKS AGAIN!
Now don't go too far away. I am sure I will be back going :banghead:>:):banghead:
Re: Need layer help ASAP please
FINALLY!
I know where I went wrong now based on your much appreciated assistance...
1 - I didn't have the "trigger button" with the link to the "onloadpop" at all( I just didn't get that from the directions - I took it that the black box with the script was the "button" - they need to be redone to indicate you need that button and then another box for the code then your layer )
Even with that it still wouldn't work for me when I did it until...
2 - needed that trigger button named to get it to work.
Got it to work now. I have to head out for some errands but when I come abck I will add it to the page and let you know how it goes.
Once again my sincere thanks. I knew it could be done just wasn't sure how.
Re: Need layer help ASAP please
:D
I think I can see a way to get this to work in V6 if anybody is interested but I wont have time to play till later tonight. I'll post the result if I have any success :)
Re: Need layer help ASAP please
Drwyd;
Got it up and running exactly as I wanted thanks to your help.
Much appreciated!
http://www.exetersportsmansclub.com
Re: Need layer help ASAP please
Hi gsthunder,
I'm curious to see how you got this to work. I use WD6 and cant get it to work unless its onclick. All I get is a split second view of the background before the screen goes white. Thats using Drwyd's sample.
It could be useful in the future to know.
I didn't think it was possible using layers. I usually use DHTML popup windows but the frames aren't very customizable.
Re: Need layer help ASAP please
Quote:
Originally Posted by
jamesd
Hi gsthunder,
I'm curious to see how you got this to work. I use WD6 and cant get it to work unless its onclick. All I get is a split second view of the background before the screen goes white. Thats using Drwyd's sample.
It could be useful in the future to know.
I didn't think it was possible using layers. I usually use DHTML popup windows but the frames aren't very customizable.
I have WD5. I have not upgraded to WD6 as I didn't see any benefit to it vs what I already had and that was paid for. Someone posted earlier the info given only works in WD5 I believe?
To make it work in WD5 I did the following after viewing Drwyd's example( his correction of my attachment )...
1 - created a new layer entitled "onloadpop" then closed it to be worked in later
2 - created a small box( the "trigger" button Drwyd refers to )on the standard layer( mouse off )and named it "my_aop". I colored it that same dark blue as my background and placed it in the header so it does not show. This is linked to the "onloadpop" layer under Link>Popup Layer.
3 - created another box( I again colored it the same as my background to hide in the header ). Place it on the standard layer( mouse off ). Using the placeholder feature I added the code below to that box.( I named this box "my_aop" as well but may not have had to? )
<script type="text/javascript">
var my_aop_oldload=window.onload;
window.onload=my_aop_load;
function my_aop_load(e)
{if(my_aop_oldload)my_aop_oldload(e);
var o=document.getElementById('my_aop');
if(o.href)window.open(o.href,'_self');};
</script>
4 - I went back to the new layer I made in step 1( "onloadpop" )and added my info.( Note it appears you can leave this layer visible or hidden and it will still work the same once published - does on my system anwyay )
5 - after I was all done I went back to the standard layer( mouse off )and clicked on the code box then the "trigger button" and did Bring To Front per Drwyd's suggestion.
Now that I know how to do it, thanks to Drwyd's help, it is easy but I had a real hard time with it. Either it caused a Script error screen that froze everything or the layer was there and I couldn't close it. Was driving me nuts. The directions given in the link I was sent to earlier in this thread don't work well for me. However, Drwyd's rework of my page and then viewing it and how it was setup made it all clear. It was very quick and easy for me to see where I went wrong with a working example. Also, not having that trigger button really screwed me up.
I really like having a "popup" window as just a layer on the page vs having it as a real Popup. That way it isn't blocked by any type of popup blocker. If there is one issue with the way this works now is that the popup layer does not load until everything else has and it has a slight delay in IE( loads right off in FF as soon as everything else does ). Not a big deal though as it opens fast enough. I thought at 1st it was not opening until I moused over the page to auto trigger the hidden button but it delays then too.
This probably won't help you but maybe it will someone else with WD5 like me.
Re: Need layer help ASAP please
I've been trying to get this, or something like it, to work in V6. No luck so far, my javascript skills are almost non existent.
1 Attachment(s)
Re: Need layer help ASAP please
Hi,
see this post, or try the attached example, is this what you need?
Attachment 76729
Re: Need layer help ASAP please
That is what I want it to do yes. I was able to make it work in WD though without using other software. I am not paying $67 for that software when I can do it in WD at no charge. Thank you though. I appreciate the info.
Re: Need layer help ASAP please
Unfortunately I was unable to get it to work with WD6 :(
Re: Need layer help ASAP please
Just an FYI to anyone who may use the link I gave earlier to the page where I did this. The popup is not always going to be used. It currently has been taken down as the info was outdated. I just didn't want people to think it is always there. It is something being used only on special occassions and for short periods.