I'm having a problem with the base tag in that it's preventing the links from loading the pages that they link to. When I remove the tag it works but then the menu bar for the page at the top disappears which I need to stay. I'm fairly new to html and any information and/or help would be greatly appreciated.

Recommended Answers

All 8 Replies

code ? to make sure, but,
<base> the href that relative urls start from, easiest fix is kill the base and set the proper url to the menu include

Ah sorry about that. I'm thinking it has something to do with the new pages no being stored on the web server at the moment since they are still under development? The index page that this code is in isn't on the server either but that's my best guess for now.

<BASE href="http://www.cpi.com/" target="content">
  <LINK REL=StyleSheet HREF="interior.css" TYPE="text/css" MEDIA=screen>
<link rel='stylesheet' href='http://www.cpi.com/interior.css' type='text/css' media='screen'>

yes, not having the pages on the server location pointed by the base href will cause problems
you can comment out the base statement during development on the localhost, and re-enable it before uploading to the server, to make sure the rest of the links work

<!-- <base href='etc'> -->
<!-- commented out for development -->

hoping that the menu is a php/asp/shtml include so you only have to do any alterations once for all files

Hmmmm I modified the code to what you suggested but still the same problem. It is also opening a new tab when attempting to connect to the page, not sure if that helps at all.

Ah okay. I have it commented out and it works but that causes the menu to disappear. It looks like the menu is created via javascript? I didn't create it but I'm pretty sure this is where the menu is being called?

<script language="JavaScript" src="javascript/menu.js"></script>
<script language="JavaScript" src="javascript/menucontextbottom.js"></script>

<script language="JavaScript">
    showToolbar();
</script>

that means the .js files on your server are not stored on your localhost development system, severely messes up if the two are not identical
If you have ftp access you should download all the server html css js files to the development system, images etc dont matter,
if you dont have the localhost complete, every alteration will have to be individually uploaded to the host to be tested
that is a pain, and total snafu can result
IF the localhost is complete development is a snap, you can make any changes you like without killing the server

javascript menus dont work where javascript is disabled for security (large %age getting larger everyday)
css menus work everywhere

Ah okay gotcha. I'm waiting on a co-worker to finish setting up a VM of the webserver but until then I'm just working from my computer so it looks like I've gotten as far as I can without the VM. But thanks a lot for your help! I really appreciate it! :)

lefthand righthand, not knowing what the other is doing,
at least they began the VM
till its up the only thing you can do is verify that the additional files work in themselves,

dos v'danye

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.