S
SmilingPolitely
I have a couple of questions on the use of JavaScript in web pages, that
I would like to open to the forum to discuss...
What are the pros and cons when using JavaScript as a substitute for
<include> for information contained on every page?
e.g.
I have a header in a .js file on every page of my site:
document.write("<a href=\"index.html\">Home<\/a> | ");
document.write("<a href=\"about.html\">About<\/a> | ");
document.write("<a href=\"bio.html\">Biography<\/a> | ");
called by:
<script type="text/javascript" src="header.js"></script>
There has been some discussion around about the use of javascript to do
this, specifically for those browsers and/users that are not JavaScript
enabled.....
but the next problem,
if the browser is not JavaScript enabled and therefore unable to see my
..js headers and footers, then how can I expect them to fill in a form
that is validated using JavaScript?
Is there a way to account for all users and their browsers, or do I aim
somewhere in the middle, html headers and footers but with JavaScript
form validation?
For your consideration.
Scott
I would like to open to the forum to discuss...
What are the pros and cons when using JavaScript as a substitute for
<include> for information contained on every page?
e.g.
I have a header in a .js file on every page of my site:
document.write("<a href=\"index.html\">Home<\/a> | ");
document.write("<a href=\"about.html\">About<\/a> | ");
document.write("<a href=\"bio.html\">Biography<\/a> | ");
called by:
<script type="text/javascript" src="header.js"></script>
There has been some discussion around about the use of javascript to do
this, specifically for those browsers and/users that are not JavaScript
enabled.....
but the next problem,
if the browser is not JavaScript enabled and therefore unable to see my
..js headers and footers, then how can I expect them to fill in a form
that is validated using JavaScript?
Is there a way to account for all users and their browsers, or do I aim
somewhere in the middle, html headers and footers but with JavaScript
form validation?
For your consideration.
Scott