HighDots Forums  

Divisions

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Divisions in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dimitri Depaepe
 
Posts: n/a

Default Divisions - 11-11-2005 , 04:44 PM






Good day all,

The use of preconfigured HTML divisions in Javascript is simple, but is
there also a way to dynamically create divisions in Javascript?

Thanks,

Dimitri.



Reply With Quote
  #2  
Old   
Tjerk Wolterink
 
Posts: n/a

Default Re: Divisions - 11-19-2005 , 05:42 AM






Dimitri Depaepe wrote:
Quote:
Good day all,

The use of preconfigured HTML divisions in Javascript is simple, but is
there also a way to dynamically create divisions in Javascript?

Thanks,

Dimitri.


yes,

see the EcmaScript DOM Api,

i think there is a method createElement in the document object.


Reply With Quote
  #3  
Old   
mscir
 
Posts: n/a

Default Re: Divisions - 11-20-2005 , 01:55 PM



Tjerk Wolterink wrote:
Quote:
Dimitri Depaepe wrote:

Good day all,
The use of preconfigured HTML divisions in Javascript is simple, but
is there also a way to dynamically create divisions in Javascript?
Thanks,
Dimitri.


yes,
see the EcmaScript DOM Api,
i think there is a method createElement in the document object.
Google for javascript DOM create div' or something similar, it turned
these up:

http://www.quirksmode.org/dom/toc.html

var x = document.body.childNodes;
var y = document.createElement('div');
y.id = 'toc';



http://www.thewatchmakerproject.com/...-dom-scripting

the next step is to create our new DIV, give it a name, and hide it:
var nd = document.createElement("div");
nd.setAttribute("id","remainder");
nd.style.display = "none";

Mike


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.