Re: Reordering DIV sections
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Reordering DIV sections

From: Randy Webb <HikksNotAtHome@aol.com>
Date: Tue Jan 31 2006 - 04:27:54 CET

RobG said the following on 1/30/2006 10:04 PM:
> evanburen@gmail.com wrote:
>> I have 12 div sections on a page and I want the user to be able to
>> specify the order in which they appear on the page. I'm thinking of
>> something like this but want to ask what people think of this approach
>> and maybe suggest another way or an article on how to do this. Thanks.
>>
>> // grab the innerhtml by:
>> var theSpan1 = getElementById("span1")
>
> getElementById is a method of the document object:
>
> var theSpan1 = document.getElementById("span1");
>
>
> It is not strictly necessary to end all statements JavaScript with a
> semi-colon, but it is recommended as good coding practice.

Depending on the statement, of course :-)
In this case it doesn't hurt to add it though.

-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Received on Tue Feb 7 21:28:22 2006