PDA

View Full Version : Loading HTML into Div


Rookie
11-13-2008, 09:15 AM
Hi all!

I would like to have my menu buttons loading the relative content HTML files, into a div.

Any suggestions on how to go about it?

I'm well up for learning how to use the code, if someone can just explain how it works.

Thanks

domedia
11-13-2008, 01:55 PM
HTMl pages don't work this way. You load full new pages, not part of pages.
Did you look into DW's template system yet?

Rookie
11-13-2008, 02:19 PM
Thanks for the reply. I'll explain exactly what I'm trying to do:

I have a page named Services.html. On this page I have a spry vertical menu in the sidebar with the Two main types of services. The submenu items are the headings of the different topics. I am trying to get the content to show up in my content div when the user selects one of the submenu items.

I am used to flash behaviours, ie. on click..loadmovie....etc.

Does a similar principle apply to Dreamweaver or do I have to think in a completely different way?

domedia
11-13-2008, 03:30 PM
Yes a little different than flash. You basically load a whole new page on the web. With the Dreamweaver template function you can put the spry menu in your template and build all your pages from the template so the menu stays on every page.

Another option would be to use a server includes, which is a little more advanced.

Rookie
11-13-2008, 04:45 PM
Thanks a million!

Are there any links / tutorials you could recommend, where I can learn how to work with server side includes?

domedia
11-13-2008, 06:21 PM
I meant PHP includes.
So if you're server is running PHP, check this out:
http://www.tizag.com/phpT/include.php

I would also check the help files for DW's own template system, our own Corrosive also made a tutorial here:
http://www.dreamweaverclub.com/dreamweaver-templates.php

Rookie
11-13-2008, 06:28 PM
I'll have a look. Thanks for all your time and effort!

domedia
11-13-2008, 10:18 PM
I'll have a look. Thanks for all your time and effort! No problem, feel free to come back if you have further comments, questions or just want to participate in the threads.