Click to See Complete Forum and Search --> : Help with inserting Meta tags using JS


blackled
08-25-2003, 10:39 PM
Hi there i have documents that i want to automatically add additional meta tags to. The documents already have some meta tags and i want to keep them all together, so i want to add my new meta tags to the end of the existing ones... can someone help me out with a script to do this... example below.

<head>
<title>The Document Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="discription" content="this documents discription">
<meta name="keywords" content="important,stuff">
<meta name="dc.subject" content="important,stuff">
<-------------------------------------------- I want to add more meta tags at this point after the current meta tags
<link href="styles.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
script stuff here
//-->
</script>
</head>

Thanks for your help in advance

pyro
08-25-2003, 10:41 PM
Why can't you just hard code them in?

blackled
08-25-2003, 10:48 PM
Originally posted by pyro
Why can't you just hard code them in?

Becuase i am doing it automatically from a form input.

pyro
08-25-2003, 10:50 PM
A serverside language would be your best bet. Does your server support PHP?

blackled
08-25-2003, 10:53 PM
Originally posted by pyro
A serverside language would be your best bet. Does your server support PHP?

No i sorry it doesn't - and i want to do it in JS @ browser level.