-
a scrolling menu question
Hi,
I am currently using a scrolling menu which is a floating div see here oops, corrected url
I now find that I want to change the menu content fairly often and there are 20 odd pages, so it is a bit long winded. would it be easy to make a floating iframe or some-such so that I can use a src="???.htm" so that i only need to change the 1 page
I am not asking for you to do it for me, just give me some idea if it is fairly straight forward for a dabbler like myself. (rest assured I will be asking for advice when i can't quite get it right)
thanks in advance
PdS
Last edited by pdsok; 11-08-2007 at 03:21 PM.
Reason: got url wrong
-
-
Here's one of the (many!) ways to do it.
1) Create a file called 'menu.html' and put your menu in it (without the styles and javascript needed for the menu to function properly!!).
2) Put this in the body part of every page:
<iframe name="iframe" src="menu.html" style="width:0px;height:0px" frameborder="0"></iframe>
<div id="loader" ></div>
In the head section of every page, put also all the styles and javascript needed for the menu to function properly.
3) Finally, also put this in the head section of every page:
<script>
function callmenu()
{document.getElementById('loader').innerHTML = frames['iframe'].document.body.innerHTML;}
window.onload=callmenu
</script>
This will write your menu to every page. Any change of the menu will be visible on every page.
As for the floating, I don't know where you've put it. It's probably part of the styles you have to put in the head section of every page.
Arie Molendijk.
-
-
sorry the link was not correct, the menu page auto loads after 10 seconds or so. I sent you to just the index page.correct link
ok, I think I see where you are going with this,
but would it be ok for me just to iframe the table part of my menu and use menu.htm as the src for that iframe?
is this a proper way of doing it or could i be making trouble for myself.
The code for the menu is towards the bottom of the source page
-
-
Yes, you could try that, although I'm not sure whether the floating of the menu will be preserved.
Arie M.
-
-
I tried that and (eventually) got it to work thanks for that my friend, makes life a lot easier
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks