Re: set up reusable html code
- From: "Kevin Spencer" <spam@xxxxxxx>
- Date: Mon, 16 Oct 2006 10:18:14 -0400
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." <Trevor_L.@Canberra> wrote in message
news:%23T6zFpL8GHA.2384@xxxxxxxxxxxxxxxxxxxxxxx
Reusable html code wrote:
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/
.
- Follow-Ups:
- Re: set up reusable html code
- From: Trevor L.
- Re: set up reusable html code
- References:
- Re: set up reusable html code
- From: Trevor L.
- Re: set up reusable html code
- Prev by Date: Re: set up reusable html code
- Next by Date: I Need help with Parameters....!
- Previous by thread: Re: set up reusable html code
- Next by thread: Re: set up reusable html code
- Index(es):
Relevant Pages
|