/    Sign up×
Community /Pin to ProfileBookmark

Removing problem code with document.write

I am using document.write to remove problem coding in my navigation bar for search engine optimization purposes. I started the external text file as follows:

<! document.write (“ ”)
//–>

Whereas, I put the entire code to remove the HTML from the page and then pasted it between the quotation marks. I even left the brackets in the coding ( ) – was that okay?

I then saved the file on my web server. My web server would not accept the .js extension when I tried to name the file so I named it without an extension.

On the HTML page, I coded the script as follows:

<script language=”JavaScript” src=”http://skunkyrunky.com/scripts/navbar1
type=”text/javascript”></script>

Now, the problem is the navigation bar – the section to the right is not appearing. You can view this at this URL:

[url]http://www.skunkyrunky.com/test-doc.htm[/url]

I want it to look like this at this URL:

[url]http://www.skunkyrunky.com/index.html[/url]

Please help me. Thank you.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @runky spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...