View Full Version : basic question about frames
happyjime
07-17-2007, 02:56 PM
aloha, basic question, please. Is there a new way to design a web page with dreamweaver where you can keep elements with no change and just change a part of it, like change just the content and keep the menu for example, Do I definately have to use frames (wich are the inconvenients of it?:confused: ) or there is a another method? sorry my english and thanks a lot for the answer.
newttyy
07-17-2007, 05:40 PM
As far as I know, if you use ASP.NET 2.0, you can have a Master page.
You can have fix elements that are never reloaded when page is changed. Just the content will be changed.
Other then that ... just work with layers. Hide and unhide stuff ...
I think it might be another way using PHP (similar with the ASP.NET Master pages), but I honestly don't really remember for sure. Maybe someone else can help more ...
If none of the above are working for you (and nobody else knows anything else) ... then yea, plain old stinky frames ...
happyjime
07-18-2007, 02:02 PM
thanks thanks thanks. i choose layers. Does this method allow me to change only a part of the page when a button is pressed? grazie mile
newttyy
07-18-2007, 09:37 PM
Yes!
You can have all your content for all your pages in different layers, all positioned in the same place, different index.
Then when you click on the Home button, you can hide the layer that is curently opened and unhide the Home layer.
If you have a bunch of pages ... it might be getting a little bit messy, but is a way.
As a cool bonus, I think you can have preloaders on each layer :). I know for sure is possible, but i just forgot how to do it ... you might want to google it.
happyjime
07-19-2007, 12:13 AM
Hey mr ninja, thanks a lot, I dont have a bunch of pages, this method will work, actually is a very simple one (to my relief). Just last question and im done, sure sure. What do you mean when you say different index? grazie again
newttyy
07-19-2007, 02:22 PM
Index ... have you ever worked with layers before?
When you have a layer, you have to spcify on what index (level / floor) that layer is. Something like this (in css):
#Layer1 {
position:absolute;
left:82px;
top:54px;
width:254px;
height:167px;
z-index:1;
}
#Layer2 {
position:absolute;
left:381px;
top:53px;
width:203px;
height:172px;
z-index:2;
}
If you are using something like Dreamweaver, then you don't have to wory abut it, unless you need to change the level of a layer.
happyjime
07-19-2007, 03:22 PM
ahh, of course, sorry, i thought about "index", pages , different pages ect...sorry, super tired and sleepy. Ive done it, 3 layers , index 1, 2 and 3. In design view everything is perfect, though when I previsualize it in explorer or firefox, layer 2, this one:
#texto {
position:absolute;
width:238;
height:491;
z-index:2;
left: 564px;
top: 107px;
background-image: url(images/contenido_03.jpg);
visibility: visible;
}
completely disappears. Do you have idea why? no answer anywhere on the google.
newttyy
07-19-2007, 03:51 PM
Do you have a fully working sample and can you provide the whole source code you are using?
Is hard to tell why is not working ... from just looking at those lines ...
happyjime
07-19-2007, 04:01 PM
yes, I dont have it online yet, im still working local cause it has this error.
the full code is this....(mega long one). I understand little, until now I was pure AS, hope you do. gracias
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CAN LLONGA CONTENIDO</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #F6B511;
}
#centro {
position:absolute;
width:473px;
height:491px;
z-index:1;
left: 91px;
top: 107px;
background-image: url(images/contenido_03.jpg);
visibility: visible;
}
#Layer2 {
position:absolute;
width:712px;
height:21px;
z-index:3;
left: 91px;
top: 598px;
visibility: visible;
}
#texto {
position:absolute;
width:238;
height:491;
z-index:2;
left: 564px;
top: 107px;
background-image: url(images/contenido_03.jpg);
visibility: visible;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="texto"></div>
<div id="centro"></div>
<div id="Layer2">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','name','Bentorno','wi dth','100','height','21','id','Bentorno','onfocus' ,'MM_showHideLayers(\'centro\',\'\',\'hide\');MM_s howHideLayers(\'texto\',\'\',\'show\')','src','but ton1','quality','high','pluginspage','http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash','movie', 'button1' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" name="Bentorno" width="100" height="21" id="Bentorno" onfocus="MM_showHideLayers('centro','','hide');MM_showHideL ayers('texto','','show')">
<param name="movie" value="button1.swf" />
<param name="quality" value="high" />
<embed src="button1.swf" width="100" height="21" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" name="Bentorno" ></embed>
</object></noscript>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','width','100','height ','21','src','button2','quality','high','pluginspa ge','http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash','movie', 'button2' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="21">
<param name="movie" value="button2.swf" />
<param name="quality" value="high" />
<embed src="button2.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="21" ></embed>
</object></noscript>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','width','100','height ','21','src','button3','quality','high','pluginspa ge','http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash','movie', 'button3' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="21">
<param name="movie" value="button3.swf" />
<param name="quality" value="high" />
<embed src="button3.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="21" ></embed>
</object></noscript>
</div>
</body>
</html>
happyjime
07-19-2007, 05:47 PM
Eo, thanks, no worry, I fixed it, have no idea what was going on. I just decided to delete the layer and build it again.Its a pitty cause I will never know what happened and how to help the others. But now its perfect. Thanks a lot a lot a lot for you attention. Grazie mile;)
newttyy
07-20-2007, 06:14 PM
Sorry for not getting back in time, but glad to see you got it right.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.