/    Sign up×
Community /Pin to ProfileBookmark

Hi,

A.
I am trying to create a Table of Content (TOC) using javascript & DOM from a page. I can get that working on Mozilla but not on IE. Can someone please help me take a look?

[url]http://emingcompany.com/jaindex.php[/url]

Under IE , if i click on the link, it does not jump to the corresponding news items.

I just realize that Mozilla is able to see the code created with javascript/DOM using “View selected source”, amazing.

looking at the source i see that the tags are created OK. So i don’t what is wrong and why the link don’t work on IE.

Is something wrong with my code, or is some of the code IE incompatible ? I suspect that IE don’t have full support of the setAttribute feature?

B.
A quick CSS question. When i do:

[code]<h3>content of h3 …content</h3>
<h4>content of h4 …content</h4>[/code]

The result is:

[code]content of h3 …content

content of h4 …content

[/code]

There will be a line break after each h3 and h4 (an empty line between h3 and h4).

How do i get rid of the line break and make it appear like this?:

[code]content of h3 …content
content of h4 …content[/code]

Thank you all for your help.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @mikecop 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...