View Full Version : metatags


redciv2
04-10-2004, 06:36 AM
If you already have Javascript and/or CSS code, is it possible to still have metatags? When I attempted to add them, my navigation disappeared, and I got a script error. Is this is possible, where would I put them considering that I can't between the </title> and the </head>?

pb&j
04-10-2004, 07:19 AM
can you post a link to the page in question and have the metas in exactly where you had them during the problem.

you definitly can have css code, javascript and metas all in your head area nicely and all work correctly. something else must be creating a problem.

redciv2
04-10-2004, 11:23 PM
Well, I'm building it on FrontPage, so I can't really post a link. I can post the code here if you want, but it will be rather long.

Rosey
04-11-2004, 12:51 AM
you would open a geocities account and upload it there.

redciv2
04-11-2004, 01:28 AM
I tried to shorten it a little, so I'm going to go ahead and post it here. If it is too long though, you can delete it and I'll take your suggestion.

<head>
<title>MY TITLE IS HERE</title>
<style type="text/css">
body{
scrollbar-face-color : #000000;
scrollbar-highlight-color : #000000;
scrollbar-3dlight-color : #000000;
scrollbar-shadow-color : #FFFFFF;
scrollbar-darkshadow-color : #FFFFFF;
scrollbar-track-color : #000000;
scrollbar-arrow-color : #FFFFFF;}
</style>
<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">

/*
Top Navigational Bar II (By Mike Hall)
Last updated: 00/05/08
Permission granted and modified by Dynamicdrive.com to include script in archive
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var myNavBar1 = new NavBar(0);
var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below

dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("LINK1", "http://dynamicdrive.com"));
dhtmlMenu.addItem(new NavBarMenuItem("LINK2", "http://www.dynamicdrive.com"));
dhtmlMenu.addItem(new NavBarMenuItem("LINK3", "http://www.dynamicdrive.com"));
dhtmlMenu.addItem(new NavBarMenuItem("LINK4", "http://www.dynamicdrive.com"));
dhtmlMenu.addItem(new NavBarMenuItem(“LINK5", "http://www.dynamicdrive.com"));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#FFFFFF", "#FFFFFF", "#000000", "#000000", "#FFFFFF", "#FFFFFF", "#000000", "#FFFFFF", "#000000")


//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("")


var fullWidth;

function init() {

// Get width of window, need to account for scrollbar width in Netscape.

fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

myNavBar1.resize(fullWidth);
myNavBar1.create();
myNavBar1.setzIndex(2);
//UNCOMMENT BELOW LINE TO MOVE MENU DOWN 50 pixels
//myNavBar1.moveTo(0,50);
}
</script>
</head>

LesPaul59
04-11-2004, 03:22 AM
Could you please put the meta tags in where you had them?

Or if that is what you had, the code is

<META NAME="keywords" content="YOUR STUFF">

<META NAME="description" content="YOUR STUFF">

this has to be between </title> and </head>...you said you can't put them there in your first post...why? You can have additional things too.

redciv2
04-11-2004, 03:50 AM
Well, I did, have them in there I mean. It made the navigation menu disappear and created a script error. I put them after the navigation code and before </head>. They aren't there in the code that I posted, because I obviously had them in the wrong place considering the disappearance of the menu, so I took them out so someone could tell me where the appropriate place to put the metatags would be.

pb&j
04-11-2004, 03:54 AM
please post the code WITH the metas in there.
since that is the cause of your problem, that is what we must see in order to fix it up.
thanks.

redciv2
04-11-2004, 04:01 AM
Okay, I finally figured it out after messing with it for a while. Thanks for the help anyway though.

LesPaul59
04-11-2004, 05:57 PM
You're welcome. It's good that you solved it on your own! :P