Click to See Complete Forum and Search --> : Another layer / frameset question
brigsM
10-08-2003, 08:10 PM
Hi… Before I embark on what sounds like will be a bloody campaign judging by related posts on here, I would like
to ask a specific question regarding layers, frames, and framesets which, depending on the answer, might lead
me to drop the idea.
I plan to have a frameset and when a link is clicked in one of the frames a new layer is dynamically created. The
new layer needs to be larger than any individual frame in the frameset. Therefore I will require the new layer to
show ‘over’ several of the individual frames.
Is this possible ? or can you just only target another single frame which would need to be large enough to display
the layer ? If I manage to work out how to target ‘parent’ or ‘top’ will that achieve what I need ?
Good news welcome anytime but bad news also appreciated ..:cool:
Sorry, but it's the bad news...
No, you can not display a layer over frames. The reason is that a layer is a child element of the document (which is contained in the frame).
brigsM
10-08-2003, 10:28 PM
Hi pyro...
Mmmm.... I'd found this info and code http://www.faqts.com/knowledge_base/view.phtml/aid/1564... I've not got it working yet (nearly have) but I don't know if thas due to my poor javascript ability or it wouldn't work even if I were a guru... If it is possible to get it working then it would mean it is possible to show a layer in an alternate frame... but I'd still need to know if it would have to be another frame or the entire frameset... I'd like to think if another frame name is possible then so would top or parent..
Please don't get me wrong as I'm not trying to say you are not correct infact I'd gues you are.. its more like I'm praying that there is a way...
If that does what you need, I obviously misunderstood what you were looking for...
brigsM
10-08-2003, 10:56 PM
Hi again pyro...
Its more like me not making myself clear... the code I found at the URL is a bit beyond me so its going to be a lot for me to get it working if it ever will.... but what I don't find clear is even if I do will it only allow me to bring the layer up in another frame which would be no good for what I'm trying to do.. basically I want to generate a pop-up but using a layer rather than opening a second seperate browser window.. however if someone knew for sure that there is no way a layer can display above multiple frames of a frameset its not going to be worth my time to try and get that found code working...
Another fear I have, and I think its more a Flash question, but the part I have got working which is showing the layer in the calling frame it displayes behind the original flash swf and so is partly hidden... I don't know even if that can be got over...:(
The code you found is not going to display a layer over frames borders, nor any other code (unless I've been missing something all this time :p).
brigsM
10-09-2003, 09:10 AM
So it is bad news ‘eh… Gee – ‘ya think I’d be used to it with thirty years in this business ! Perhaps Sun and Netscape should have realized their low limitations and got someone who knows how to develop languages namely Big Blue to do the job…. But, thank goodness they didn’t do a worse job than they have and go use the Gates crew…
Setback doesn’t scratch the surface to describe my problems now…. Total rethink and redesign is now required on my part and the end product will only be a fraction of what I’d hoped….
I’m blown away that two major corporations in nearly eight years haven’t been able to come up with a fundamental of any language – the ability to output to the screen with full control and flexibility… It’s a bunch of BS and my first impression of JavaScript seems correct…. Time to change me thinks and switch to using a real language….
A big thank you pyro for your help and advice…. Despite wasting nearly three months of development at least you managed to save me a little time by me not wasting even more on this… Indebted to ‘ya Sir
Cheers……
I think that is a common frustration that hard core programmers have when they try to do things related to the internet. But, as you've found out, programming for the internet is not like programming applications - you are more limited in what you can do. A large part of this is for security reasons, and other reasons include browser/language limitations, I suppose.
Out of curiosity, why can't you just use a new window?
brigsM
10-10-2003, 08:45 AM
Hi again pyro…
I was trying to use layers for a couple of reasons – One was to create a different look and feel to the site, another is like most I hate endless secondary pop-up browser windows that only serve most mouse practice at clicking the window close X box, and third I suppose to try and side step any potential of something like a ‘pop-up window Ad’ killer getting in the way.
Not sure what their perception of security risk might be when by standard definition in html and other javascript one frame can reference another frame nested or not and attempt to open anything it wants or open a new window all together… why its perceived as such a risk to reference top/parent and have a layer overlay multiple frames is beyond my understanding. If I’m up to no good and open the file in the original frame what’s the difference to if I opened it at top… Maybe its that combined they are not bright enough to have thought of it when developing javascript…
As I said before I’m STUNDED :confused: by it – its such a fundamental… bet hey like ‘all’ I’m just ‘one’ and so insignificant… My cohorts and I have decided to use Java and eat the extra development and overhead… As one who hates to be beaten and on a personal note I’ll keep tabs on the javascript gang incase they get their act together one day.
Thanks again pyro ! I hope one day I can return the help…….
Sure thing, I was happy to help... :)
jbergthorson
10-10-2003, 09:33 AM
Why don't you use a modeless dialog window instead of a layer. It is a window that will always sit over your current window and allow you to click on the window behind it. If you use a trusted application you can set one of its properties to make it look like a layer:
unadorned:yes
This removes the blue IE box from around it so that it just looks like a white layer. Mind you it won't have any transparency, but i do not know if that is an issue or not.
In order to open a modeless dialog window you use the following code:
myPretendLayer = window.showModelessDialog("myDoc.html",anObjectContainingAnyVarsYouWantToPass, "dialogHeight:200px; dialogWidth:200px; dialogLeft:0px; dialogTop:0px; resizable:yes; help:no; status:no; unadorned:yes");
There are also other parameters to alter it's look and feel. All of them are, as far as i know are:
dialogHeight: sHeight
dialogLeft: sXpos
dialogTop: sYpos
dialogWidth: sWidth
center: yes | no | 1 | 0 | on | off
dialogHide: yes | no | 1 | 0 | on | off
edge: sunken | raised
help: yes | no | 1 | 0 | on | off
resizable: yes | no | 1 | 0 | on | off
scroll: yes | no | 1 | 0 | on | off
status: yes | no | 1 | 0 | on | off
unadorned: yes | no | 1 | 0 | on | off
So you can open this window where ever you want, remove it's adornment, and the user will not be able to close or move it, so in effect it will look just like a layer, but be able to sit above anything that is under it. But as i said to remove the adornment you have to have a trusted site, but most people always click "ok" anyways. Make sure you close that window on the close on your page though! onUnload="myPretendLayer.close();"
Let me know if this helped or if you have any more questions,
jason
Modeless dialog windows are IE only...
jbergthorson
10-10-2003, 09:58 AM
who uses anything other than IE these days? :p
Me. Mozilla Firebird (http://www.mozilla.org/products/firebird/) for me... ;)
All we've got to do is hope more and more people get smart and make the switch... :D
jbergthorson
10-10-2003, 10:14 AM
I found this:
http://www.dannyg.com/support/modalFix.html
it's a modeless dialog that works in IE and NN... dunno about mozilla though ;)
The thing with creating web "apps" is that if you want anything cool but also want to support cross browser use, you are pretty much out of luck. They are a trade off. It is like saying to someone: I want you to write this C++ program, and I want it to run on Windows XP, Mac and Unix. Oh and I also want it to run of off the network so there can only be one copy of the software.
If you want to make something cool, make it for your users. If your users are typically IE then make it for IE. If they are Mozillians, do it for that.
It also goes the same way with screen resolutions now. I guess yuo are "supposed" to make everything workable for 640x480... but c'mon that makes it suck for everyone else out there.
I would say make your website/app as cool and usefull as you can and just say on the startup page "needs IE 5.0 or higher at 1024x768" or whatever. I am all about progress and holding back on your application or Site is silly. I had a job not that long ago with my university making a Site for them... they wanted it cool, but to also support NN 4.7 users... talk about a pain the behind, because I know that perhaps 1/9999999999 people use NN 4.7, so it was just ruining it for everyone else out there.
Anywho... that's my rant for the day. ;)
Originally posted by jbergthorson just say on the startup page "needs IE 5.0 or higher at 1024x768" or whatever.
Better, if you need to use browser specific content, just provide a seemless alternative for other users, so they don't even know what they are missing, and the page remains accessible.
I am all about progress and holding back on your application or Site is silly.
Progress is making pages that are accessible to all, regardles of the meduim used to access it.
they wanted it cool, but to also support NN 4.7 users...so it was just ruining it for everyone else out there.
Start with valid HTML 4.01 Strict or XHTML markup, CSS for layout (or a hybrid layout, if needed) and add things from there. The result will be a page that works for all users, and can still look cool to those using newer browsers.