flashnurde
16.05.2001, 18:36
hey everybody,
first of all please excuse if my question might sound too rookie like to you guys... my question as you might guess is related to the showHide script which can be found under http://www.bratta.com/dhtml/scripts.asp?url=scripts/scripts.asp?id=1&ac=23&order=created i am using the regular show/hide option so far everything works out just fine. now though i was attempting to use the script in combination with about 10-15 div layers... they should all be positioned on top of each other and the respective layer should be shown if a link as been clicked... of course only one div should be revealed at the same time which means that if another div is about to be revealed i would first have to hide the previously selected div... so basically, i would have to make some adjustment within the following functions:
<pre id=code><font face=courier size=2 id=code> //Shows the div
function show(div,nest){
obj=bw.dom?document.getElementById(div).style:bw.i e4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
obj.visibility='visible'
}
//Hides the div
function hide(div,nest){
obj=bw.dom?document.getElementById(div).style:bw.i e4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
obj.visibility='hidden'
} </font id=code></pre id=code>]
my problem now though is that i am not too sure about how to best go about this issue... any suggestions/comments would be highly appreciated maybe even suggestions on how to solve it in a different way, i dont know? since i am coming more from the Actionscripting area i just started messing around with JS more.. since now it all starts to make more sense to me after all that is :) i guess my solution is not a very professional one having all div layers loaded even though maybe not all are being requested by the user... the reason for doing so was because i did not want to reload the complete page instead i just wanted to "reload" a layer with new content, because of that i was testing the iframe solution... that though didnt really work for me because they wont allow content to "shine" through... soo hmmm as u can see i sound a little lost hehe thanx a lot chris
http://www.2-obvious.co.uk
http://www.formrecording.com
http://www.meridianspa.de
http://www.ck-design.com
first of all please excuse if my question might sound too rookie like to you guys... my question as you might guess is related to the showHide script which can be found under http://www.bratta.com/dhtml/scripts.asp?url=scripts/scripts.asp?id=1&ac=23&order=created i am using the regular show/hide option so far everything works out just fine. now though i was attempting to use the script in combination with about 10-15 div layers... they should all be positioned on top of each other and the respective layer should be shown if a link as been clicked... of course only one div should be revealed at the same time which means that if another div is about to be revealed i would first have to hide the previously selected div... so basically, i would have to make some adjustment within the following functions:
<pre id=code><font face=courier size=2 id=code> //Shows the div
function show(div,nest){
obj=bw.dom?document.getElementById(div).style:bw.i e4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
obj.visibility='visible'
}
//Hides the div
function hide(div,nest){
obj=bw.dom?document.getElementById(div).style:bw.i e4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
obj.visibility='hidden'
} </font id=code></pre id=code>]
my problem now though is that i am not too sure about how to best go about this issue... any suggestions/comments would be highly appreciated maybe even suggestions on how to solve it in a different way, i dont know? since i am coming more from the Actionscripting area i just started messing around with JS more.. since now it all starts to make more sense to me after all that is :) i guess my solution is not a very professional one having all div layers loaded even though maybe not all are being requested by the user... the reason for doing so was because i did not want to reload the complete page instead i just wanted to "reload" a layer with new content, because of that i was testing the iframe solution... that though didnt really work for me because they wont allow content to "shine" through... soo hmmm as u can see i sound a little lost hehe thanx a lot chris
http://www.2-obvious.co.uk
http://www.formrecording.com
http://www.meridianspa.de
http://www.ck-design.com