Computing.Net > Forums > Web Development > Use Javascript to insert html

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Use Javascript to insert html

Reply to Message Icon

Name: chantaspell1977
Date: November 30, 2005 at 16:51:35 Pacific
OS: xp sp2
CPU/Ram: 2400/256
Comment:

Hi, I want to use javascript to insert my constantly updated navbar into all my pages without laboriously updating each page with the new navbar. I have chosen to use javascript as using php/ssi means moving to .shtml from .html thus losing my page rank etc.

The question is this: Will googlebot crawl the links in the navbar (it will be in html, just using javascript to insert it), and secondly, can anyone explain how to do it? I am a bit of a novice with javascript!

Cheers

thomas



Sponsored Link
Ads by Google

Response Number 1
Name: Dr. Nick
Date: November 30, 2005 at 18:13:34 Pacific
Reply:

I do not believe search engines bots, including Googlebot, render HTML pages. They depend on all the information being available as text inside the file.

So no, if you use Javascript to generate links, Googlebot will likely not see them.


0

Response Number 2
Name: Michael J (by mjdamato)
Date: November 30, 2005 at 20:44:13 Pacific
Reply:

I thought I answered the second part of your question in your last post. In your html pages where you want the menu to appear put

[script language="javascrip" source="menu.js"][/script]

Then in the menu.js file just put document.write commands with the html you want to have displayed:

docuemtn.write("Line 1 of HTML");
docuemtn.write("Line 2 of HTML");
etc.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Use Javascript to insert html

Using Javascript to determine... www.computing.net/answers/webdevel/using-javascript-to-determine/2683.html

Javascript to save last page viewed www.computing.net/answers/webdevel/javascript-to-save-last-page-viewed/1659.html

Is it possible to use javascipt to www.computing.net/answers/webdevel/is-it-possible-to-use-javascipt-to-/3138.html