FORUMS: list search recent posts

same menu/graphics SURROUNDING multiple pages

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Todd Rogers
same menu/graphics SURROUNDING multiple pages
on Mar 8, 2010 at 5:09:35 pm

Newbee Question:

I'm creating a website where the menu and graphics surround the pages. Just like the menu, those surrounding graphics should stay the same when navigating through the site, but without having to reload. Which would be the best way to go and how? PHP, Javascript, iframe?

Thanks in advance,
Todd


Return to posts index

Mike Smith
Re: same menu/graphics SURROUNDING multiple pages
on Mar 9, 2010 at 10:03:10 am

If the page is not to reload, then you'll be wanting to use something clientside so not php. Iframes should work, with your link target set to be the iframe, though you could also use javascript to write new data into your changeable area if you wanted to.


Return to posts index

Todd Rogers
Re: same menu/graphics SURROUNDING multiple pages
on Mar 9, 2010 at 3:04:46 pm

Thanks. But would it be possible to link the changeable area to the menu bar with Javascript?


Return to posts index


Mike Smith
Re: same menu/graphics SURROUNDING multiple pages
on Mar 10, 2010 at 9:20:44 am

Yes. You'd have to give your target html elements individual ids. And your javascript would then select those elements and write into them.

If you want to do it you'd use something like ...

document.getElementById('elementid').innerHTML = content

Have a look at
http://www.tizag.com/javascriptT/javascript-innerHTML.php

innerHTML is a deprecated element, but is supported at least in IE and Firefox, and maybe others (you'd need to search or test). There are more lengthy standards-compliant approaches - have a look at
http://javascriptkit.com/javatutors/dynamiccontent4.shtml

http://domscripting.com/blog/display/35
http://www.quirksmode.org/dom/w3c_html.html
http://www.w3schools.com/jsref/prop_html_innerhtml.asp

Of course a small percentage of specialist web viewing tools or browsers don't use javascript, and some users have javascript disabled.

Using iframes might be easier, unless you are not changing very much text.


Return to posts index

Todd Rogers
Re: same menu/graphics SURROUNDING multiple pages
on Mar 10, 2010 at 2:44:12 pm

Thanks a lot!!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]