set up reusable html code

R

Reusable html code

I have code that I use from page to page. Can I set up a common routine and
usse it from page to page. If so How do I do this..thanks
 
T

Trevor L.

Reusable said:
I have code that I use from page to page. Can I set up a common
routine and usse it from page to page. If so How do I do this..thanks

Ronx and Kathleen have suggested use of includes. Some servers do not
support this, so I have a Perl script (written by David Dorward) which will
do this for you on your local disk *before* uploading to the server. Post
back if you want it and I will find the reference.

Kevin,
Sure, your comment is technically correct:
"HTML is markup language, not programming language. There are no routines in
HTML."

But I think we all (at least the four who have responded to date) know what
the OP means.

In fact, the OP could set up the code as Javacript
fucntion include_number1()
{
document.write(
// valid HTML code in here (in quotes)
)
}
and then call it in their HTML
<script type ="text/javascript">include_number1()</script>

Couldn't one say that this usage qualifies as a routine ?
 
R

Ronx

Ronx and Kathleen have suggested use of includes. Some servers do not
support this

*All* servers support FrontPage includes. FP extensions are not
necessary. The included content is placed in the page when the page is
saved, not when it is served, thus the included content is always
available.

Server Side Includes are a different matter - these require server
support.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



Reusable said:
I have code that I use from page to page. Can I set up a common
routine and usse it from page to page. If so How do I do this..thanks

Ronx and Kathleen have suggested use of includes. Some servers do not
support this, so I have a Perl script (written by David Dorward) which will
do this for you on your local disk *before* uploading to the server. Post
back if you want it and I will find the reference.

Kevin,
Sure, your comment is technically correct:
"HTML is markup language, not programming language. There are no routines in
HTML."

But I think we all (at least the four who have responded to date) know what
the OP means.

In fact, the OP could set up the code as Javacript
fucntion include_number1()
{
document.write(
// valid HTML code in here (in quotes)
)
}
and then call it in their HTML
<script type ="text/javascript">include_number1()</script>

Couldn't one say that this usage qualifies as a routine ?
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
M

Murray

Couldn't one say that this usage qualifies as a routine ?

I believe so.

--
Murray
--------------
MVP FrontPage


Trevor L. said:
Reusable said:
I have code that I use from page to page. Can I set up a common
routine and usse it from page to page. If so How do I do this..thanks

Ronx and Kathleen have suggested use of includes. Some servers do not
support this, so I have a Perl script (written by David Dorward) which
will do this for you on your local disk *before* uploading to the server.
Post back if you want it and I will find the reference.

Kevin,
Sure, your comment is technically correct:
"HTML is markup language, not programming language. There are no routines
in HTML."

But I think we all (at least the four who have responded to date) know
what the OP means.

In fact, the OP could set up the code as Javacript
fucntion include_number1()
{
document.write(
// valid HTML code in here (in quotes)
)
}
and then call it in their HTML
<script type ="text/javascript">include_number1()</script>

Couldn't one say that this usage qualifies as a routine ?
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
K

Kevin Spencer

Hi Trevor,

JavaScript is not HTML, but a scripting language, so while, yes, the
JavaScript you posted is certainly a routine, it is not HTML. It can be used
in conjunction with HTML, just like CSS, which is also not HTML. HTML
includes attributes and an object model (DOM) that can be used by JavaScript
(or other scripting languages). However, JavaScript can be used outside of
HTML as well, and is, in fact, a completely different technology.

I understood perfectly what the OP meant by what he said. I also saw that
his specific question had been answered quite well by Ronx and Kathleen. My
intent was to help him understand the difference between markup, which is
static, and process, which is dynamic. Understanding this difference is
essential if one intends to do anything dynamic with a web page.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.

Trevor L. said:
Reusable said:
I have code that I use from page to page. Can I set up a common
routine and usse it from page to page. If so How do I do this..thanks

Ronx and Kathleen have suggested use of includes. Some servers do not
support this, so I have a Perl script (written by David Dorward) which
will do this for you on your local disk *before* uploading to the server.
Post back if you want it and I will find the reference.

Kevin,
Sure, your comment is technically correct:
"HTML is markup language, not programming language. There are no routines
in HTML."

But I think we all (at least the four who have responded to date) know
what the OP means.

In fact, the OP could set up the code as Javacript
fucntion include_number1()
{
document.write(
// valid HTML code in here (in quotes)
)
}
and then call it in their HTML
<script type ="text/javascript">include_number1()</script>

Couldn't one say that this usage qualifies as a routine ?
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
T

Trevor L.

Kevin said:
Hi Trevor,

JavaScript is not HTML, but a scripting language, so while, yes, the
JavaScript you posted is certainly a routine, it is not HTML. It can
be used in conjunction with HTML, just like CSS, which is also not
HTML. HTML includes attributes and an object model (DOM) that can be
used by JavaScript (or other scripting languages). However,
JavaScript can be used outside of HTML as well, and is, in fact, a
completely different technology.
I understood perfectly what the OP meant by what he said. I also saw
that his specific question had been answered quite well by Ronx and
Kathleen. My intent was to help him understand the difference between
markup, which is static, and process, which is dynamic. Understanding
this difference is essential if one intends to do anything dynamic
with a web page.
--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.

Thanks for that, Kevin and for the usual great explanation. We certainly
need to understand just what HTML is and isn't.
But I think we all (at least the four who have responded to date) know
what
the OP means.

I had thought that you were just dismissing the question, but as you say
Ronx and Kathleen had answered it.
 
T

Trevor L.

Ronx said:
*All* servers support FrontPage includes. FP extensions are not
necessary. The included content is placed in the page when the page
is saved, not when it is served, thus the included content is always
available.

Server Side Includes are a different matter - these require server
support.

My apologies, I was thinking of SSI.

Of course, shared borders are just a special case of FP Includes, are they
not?
 
R

Ronx

Of course, shared borders are just a special case of FP Includes, are
they

Correct

--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



Ronx said:
*All* servers support FrontPage includes. FP extensions are not
necessary. The included content is placed in the page when the page
is saved, not when it is served, thus the included content is always
available.

Server Side Includes are a different matter - these require server
support.

My apologies, I was thinking of SSI.

--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
K

Kevin Spencer

Hi Trevor,

I've been a bit under the gun lately, and was probably more brief in my
initial response than I should have been.

--
:)

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.

I had thought that you were just dismissing the question, but as you say
Ronx and Kathleen had answered it.
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 

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