Subj : Re: anchors To : netscape.public.mozilla.jseng,netscape.public.mozilla.dom From : Martin Honnen Date : Wed Dec 31 1969 04:00 pm [cross post to the DOM group, and follow up set to the DOM group as the question doesn't relate to JavaScript engines] Eike Jordan wrote: > hello list, > > i'm working on dynamically created anchors that should add some extra page > navigation. the idea was to get all elements of one 'taste' and then append > an anchor on each. right now 'top' and 'bottom' work as expected but none > of the dynamic one's. > is there anybody, who can tell me why this testpage fails? Before I jump into that code trying to understand it: are you aware that using the element to have an anchor is not necessary in HTML 4? You can simply use an id attribute for an element and then it is an anchor that is if you simply from the beginning give every

element an id then you have the anchors you want (as any browser which supports that DOM scripting should also support treating elements with id as anchors) As for the code, what fails, are you getting error messages, if so what browser are you testing with? As the doctype indicates XHTML, are you serving that as text/html or as an XML mime type (application/xhtml+xml, text/xml)? In the latter case you need document.createElementNS to create your elements. > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > > > > > >

Welcome to the slide

>
this is the place where href="javascript:slide()">everything changes
>
goto: bottom, dynamic > anchor 26
>

another boring paragraph

>

another boring paragraph

>

another boring paragraph

>

another boring paragraph

>

another boring paragraph

>

another boring paragraph

> >
> top > >
> > > -- Martin Honnen http://javascript.faqts.com/ .