Altering one phrase in an include (Dynamic HTML?)

T

Trevor L.

I have used framesets to add a heading and a sidebar to
each page.

Example from http://tandcl.homemail.com.au/index.html
<frameset rows ="17.5%,81.5%" border="0">
<frame src="index_top.html" scrolling="no"/> (A heading)
<frameset cols="18.5%,*" border="0">
<frame src="sidebar.html" /> (The sidebar)
<frame src="index_main.html" /> (The main content)
</frameset>
</frameset>

The point is that ..._top.html varies only slightly for
each page. What varies is the document title (which isn't
that important) and about 5-6 words of text in a table
cell which displays in the heading.

Can I create a function to which I pass the text and
which generates the modified heading with that text.

I hope that it is a bit clearer than mud.
 
S

Stefan B Rusynko

Only possible using dynamic framesets and JavaScript
See http://javascript.internet.com/navigation/dynamic-frameset.html

IMHO
Don't make the site in frames
For such simple content you are creating more problems than it is worth




| I have used framesets to add a heading and a sidebar to
| each page.
|
| Example from http://tandcl.homemail.com.au/index.html
| <frameset rows ="17.5%,81.5%" border="0">
| <frame src="index_top.html" scrolling="no"/> (A heading)
| <frameset cols="18.5%,*" border="0">
| <frame src="sidebar.html" /> (The sidebar)
| <frame src="index_main.html" /> (The main content)
| </frameset>
| </frameset>
|
| The point is that ..._top.html varies only slightly for
| each page. What varies is the document title (which isn't
| that important) and about 5-6 words of text in a table
| cell which displays in the heading.
|
| Can I create a function to which I pass the text and
| which generates the modified heading with that text.
|
| I hope that it is a bit clearer than mud.
 
T

Trevor L.

Rob,
Yeah, it isn't what I wanted and it isn't what occurred before I put this
heading (including pictures) in a frame.

Is there no way around this?

Previously, I used shared borders in FP and the heading changed for each
page. But I noted that FP put the code for the border into each html file. I
thought that using includes (basically frames, because I have found no other
way of including as yet) would reduce the amount of code. But I found that I
had to do the same thing - that is create code for each page for which I
wanted the top border. My query was to find a way to avoid this, i.e. have
one piece of code to include but pass to it the heading.

I will experiment with ways to avoid the picture being restricted to the
size of the frame, perhaps target=_blank will do it.

Having perused this newsgroup daily for a few weeks, I note that quite a few
people have said "don't use frames" (or words to that effect). If there is
another way, I will gratefully accept it.

As you may have gathered, I am a novice in Web page construction and design,
and in HTML and associated languages, but I do have many years programming
experience - sometimes in arcane languages but often in fairly mainstream
stuff, so I am not afraid of coding to achieve what I want.

--
Cheers,
Trevor L.


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
T

Trevor L.

Rob,
Thanks again.

I keep getting the message "Don't Use Frames". I am happy to follow that advice.

BUT, how do I include?

I found this on FP help


About using a single source of content on multiple web pages
Embedding a web page on other web pages in a web site

You can display a web page on another page in the web site, allowing you to maintain separate pages. For example, to display a copyright notice on several pages in a web site, create one page that contains the copyright notice, and include that page on other pages in the web site. When you update the copyright notice, you simply update that one page; all other pages that include the copyright page will be automatically updated.

Creating information that can update automatically

A variable is information displayed on a page that can be set to change or update automatically. Microsoft FrontPage has four predefined variables that gather information automatically when you put them on a page:

a.. Author
b.. Modified by
c.. Description
d.. Page URL
You can also define a variable yourself, such as a copyright or a comment.

For example, you want to refer to a product throughout your web site, but the name might change. You define a variable for the product (you set a name and value, such as Product and My Product's Name 1.0), and then place the variable on your pages. If the product name changes, you simply change the value of the variable you defined, and then new the product name is automatically displayed in your web site.


This is what I would like to do, but it doesn't say how !

Help says " For example, ........ include that page on other pages in the web site." But where do I find the include command - it doesn't say. Maybe it is talking about using shared borders - I don't know!

The second bit also seems to be what I am trying - having variables that can change. It also doesn't say how. However, until I understand how to include, it is a bit academic.

When you say " build a blank page (or several of them) to use as templates", are you suggesting that I continue doing what I am doing, that is having one page which I modify in the small bits that change and then copy in?

This works O.K. but doesn't this mean lots of duplicate code? I was trying (perhaps too hopefully) to avoid this.

--
From a confused newbie
Trevor L.


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
T

Thomas A. Rowe

You can find the Include Page command under the Insert Menu | Web components.

You can not do what you want using the FP substitute web bot, as you would have to define one for
every heading, and it would be easier to just add the heading directly to each page.

You would have to use/learn ASP, ASP.net, PHP or CFM to accomplish with a database as this would be
a custom application, so you would most likely not find any pre-written code snips.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Rob,
Thanks again.

I keep getting the message "Don't Use Frames". I am happy to follow that advice.

BUT, how do I include?

I found this on FP help


About using a single source of content on multiple web pages
Embedding a web page on other web pages in a web site

You can display a web page on another page in the web site, allowing you to maintain separate pages.
For example, to display a copyright notice on several pages in a web site, create one page that
contains the copyright notice, and include that page on other pages in the web site. When you update
the copyright notice, you simply update that one page; all other pages that include the copyright
page will be automatically updated.

Creating information that can update automatically

A variable is information displayed on a page that can be set to change or update automatically.
Microsoft FrontPage has four predefined variables that gather information automatically when you put
them on a page:

a.. Author
b.. Modified by
c.. Description
d.. Page URL
You can also define a variable yourself, such as a copyright or a comment.

For example, you want to refer to a product throughout your web site, but the name might change. You
define a variable for the product (you set a name and value, such as Product and My Product's Name
1.0), and then place the variable on your pages. If the product name changes, you simply change the
value of the variable you defined, and then new the product name is automatically displayed in your
web site.


This is what I would like to do, but it doesn't say how !

Help says " For example, ........ include that page on other pages in the web site." But where do I
find the include command - it doesn't say. Maybe it is talking about using shared borders - I don't
know!

The second bit also seems to be what I am trying - having variables that can change. It also
doesn't say how. However, until I understand how to include, it is a bit academic.

When you say " build a blank page (or several of them) to use as templates", are you suggesting
that I continue doing what I am doing, that is having one page which I modify in the small bits that
change and then copy in?

This works O.K. but doesn't this mean lots of duplicate code? I was trying (perhaps too hopefully)
to avoid this.

--
From a confused newbie
Trevor L.


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top