hi waseem, thx for your idea and really appreciate for doing it. what
i want to know is how to display these toolbars-"div"s base on
retrieved data from database.
for example:
orginal order
div id=1 class=1
div id=2 class=2
div id=3 class=3
assume i retrieved data from database is array,which contains the
customised order "3","1","2"

how to display divs like this?
div id=3 class=3
div id=1 class=1
div id=2 class=2


On Jul 4, 2:04 pm, waseem sabjee <waseemsab...@gmail.com> wrote:
> lets just see the logic behind this.
>
> <div class="listitem position1">
> item
> </div>
>
> <div class="listitem position2">
> item
> </div>
>
> <div class="listitem position3">
> item
> </div>
>
> <div class="listitem position4">
> item
> </div>
>
> say we have  item as mentioned above.
> METHOD 1
> ------------------
> save to database :
> your table would be like so
>
> if you are using MYSQL
> ID INT(11) NOT NULL auto_increment,
> userID INT(11) NOT NULL,
> position TEXT NOT NULL,
> html TEXT NOT NULL
>
> if you are using SQL SERVER
> ID INT NOT NULL -- set identifier to yes and set increment to 1
> userID INT NOT NULL,
> position VARCHAR(max) NOT NULL,
> html VARCHAR(max) NOT NULL
>
> for both cases index ID as Primary Key
> non clustered index on position
> non clustered index on html
> my idea is to save the html of a specific position  to the db and refill the
> positions based on this
> note i used classes such as position1, position2 to identify my locations
> I have created one table that will keep track of the positions for each user
>
> if you do not want to use a database you can use cookies :)
> your cookies would be :
> position, html
> same type of logic
>
> On Sat, Jul 4, 2009 at 3:39 AM, cs...@hotmail.com 
> <cs3p...@googlemail.com>wrote:
>
>
>
> > Hi all:
>
> > i am trying to use jquery UI sortable on my webpage to display
> > toolbars. what i want is, let people sort these toolbars in the way
> > they like. i have named toolbars with id "1","2","3","4", and i saved
> > sorted order to database via toArray method. i was wondering how i
> > could display these toolbars with new order when people browser my
> > site next time, is there any method that supports it?
>
> > i am really appreciate for your help, thx in advance
>
> > andy

Reply via email to