warfish70
08-20-2010, 01:41 PM
Hi all
I'm rather new to java scripting and trying to get this done for over a week now.
I'm building a complete new site (not online yet) which is done for 99,9%
The site consists of:
Index - No frames - Just an entrance of the site with links
main menu
Section1 - 1 iframe ("iframe1") - default src=iframe1defaultsection1content
main menu submenu section1
Section2 - 2 iframes ("iframe1","iframe2") - default src = iframe1defaultsection2content - frame2 contains images that change
main menu submenu section2
Section3 - 1 iframe ("iframe1") - default src=iframe1defaultsection3content
main menu submenu section3
Section4 - 1 iframe ("iframe1") - default src=iframe1defaultsection4content
main menu submenu section4
Contact - 1 iframe ("iframe1") - default src=iframe1defaultcontactcontent
main menu submenu contact
The main menu is plain html that is on every page
I use javascripts to make a loadIframeFunction load content into the iframes
<head>
<script type="text/javascript>
var iframeids=["iFrame1"]
var iframehide="yes"
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
</script>
</head>
<body>
<iframe id="iframe1" src="iframesection1start.html" width="644px" height="385px" style="position:absolute; left:505px; top:275px; z-index:73 scrolling="yes" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<a href="javascript:loadintoIframe('iframe1', 'iframecontent.html')" title="content">Content</a>
</body>
Everything works, but 1 thing.
i can't get the links in the index page link to the specific section page AND change the default src content
can anybody assist me pls?
I'm rather new to java scripting and trying to get this done for over a week now.
I'm building a complete new site (not online yet) which is done for 99,9%
The site consists of:
Index - No frames - Just an entrance of the site with links
main menu
Section1 - 1 iframe ("iframe1") - default src=iframe1defaultsection1content
main menu submenu section1
Section2 - 2 iframes ("iframe1","iframe2") - default src = iframe1defaultsection2content - frame2 contains images that change
main menu submenu section2
Section3 - 1 iframe ("iframe1") - default src=iframe1defaultsection3content
main menu submenu section3
Section4 - 1 iframe ("iframe1") - default src=iframe1defaultsection4content
main menu submenu section4
Contact - 1 iframe ("iframe1") - default src=iframe1defaultcontactcontent
main menu submenu contact
The main menu is plain html that is on every page
I use javascripts to make a loadIframeFunction load content into the iframes
<head>
<script type="text/javascript>
var iframeids=["iFrame1"]
var iframehide="yes"
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
</script>
</head>
<body>
<iframe id="iframe1" src="iframesection1start.html" width="644px" height="385px" style="position:absolute; left:505px; top:275px; z-index:73 scrolling="yes" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<a href="javascript:loadintoIframe('iframe1', 'iframecontent.html')" title="content">Content</a>
</body>
Everything works, but 1 thing.
i can't get the links in the index page link to the specific section page AND change the default src content
can anybody assist me pls?