| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
|
Howdy...
![]() I was reading this article... http://www.devarticles.com/c/a/Web-S...ut-with-CSS/6/ It looks good... I was wondering if I could specify the external file for the content... For example, it says... HTML Code:
<div id="header">Header Section</div> <div id="leftcol">Left Section</div> <div id="content">Content Section</div> <div id="rightcol">Left Section</div> <div id="footer">Footer Section</div> HTML Code:
<div id="header">header.html</div> <div id="leftcol">navigation.html</div> <div id="content">content.html</div> <div id="rightcol">extra.html</div> <div id="footer">footer.html</div> ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#2 |
|
Well known nobody
Join Date: Jul 2004
Location: Australia
Posts: 818
|
I'm no expert at things like this, but i think that you need to use php for something like that... At least all the places where i can think of html being reused it seems to be php.
|
|
|
|
|
|
|
|
|
#3 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
|
Found it... DIV accepts source file the same way iframe does...
![]() HTML Code:
div src="somefile.html"></div>
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#4 |
|
WHAT!?
Join Date: Aug 2004
Location: San Diego, CA
Posts: 1,774
|
Thanks for the article link CyanBlue. Gave me the answer to a problem i was having as well.
|
|
|
|
|
|
#5 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
|
Hm... NOW... Does anybody know how I can refresh the content of one DIV from another???
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#6 |
|
WHAT!?
Join Date: Aug 2004
Location: San Diego, CA
Posts: 1,774
|
I am creating something like that right now. I am going to use the onSelect function to tell a javascript to run a function that turns my other div visible.
In my case I have a select statement that when a certain item is selected a div is turned visible for more options. I'll have something tommorrow if you dont find a solution. |
|
|
|
|
|
#7 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
|
Here is abit more detailed version of that question if anybody can help me...
I have two DIV frames... HTML Code:
<body> <div id="leftcol"><?php include("navL.html"); ?></div> <div id="content"><?php include("content.php"); ?></div> </body> )This is the content of the navL.html file... HTML Code:
<script type="text/javascript"> <!-- function load(arg) { alert(arg); document.getElementByID("content").src = arg + ".html"; } //--> </script> <a href="#" onClick="javascript:load('test1');">test1</a> <BR> <a href="#" onClick="javascript:load('test2');">test2</a> ![]() Does anybody know how I can solve this problem??? Thank you very much... ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#8 |
|
Registered User
|
<div src="fn.htm" ></div>
This is not wokring for me. Could somebody suggest me. Best Regards Sreeni |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Dec 2007
Posts: 1
|
Reply for Sreeni Ques..
It Wont work bcoz div doesn't an attrib called src.. Instead you can make use of the javascript+iframe to do the magic for you.. May be this could answer your question ================================================== ======================= <html> <head> <script type="text/javascript"> function setMyDiv(userFile) { document.getElementById("myDiv").innerHTML = "<iframe src='"+userFile+"' width=800 height=300 frameborder=0 scrolling=yes>"; } </script> </head> <body onLoad="setMyDiv('http://www.altavista.com/')"> <div id="myDiv"> Default content for Div </div> <br /> <br /> <form> <input type="button" onClick="setMyDiv('http://www.google.com/')" value="Google" /> <input type="button" onClick="setMyDiv('http://www.altavista.com/')" value="Altavista" /> </form> </body> </html> ================================================== ======================= |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|