Hi! I want to implement a functionality where I want specific toolbar functions in a particular div. For example: < div id="shapes"> will contain different shapes; < div id="actions">will contain different actions like save, undo redo etc. How can I implement this?

asked 02 Nov '12, 11:55

yash's gravatar image

accept rate: 0%

If you mean JavaScript you can add everything into a single toolbar and then move the elements into those DIVs via document.getElementById (use the id attribute as explained in the docs).


answered 02 Nov '12, 13:29

Gaudenz's gravatar image

accept rate: 39%

Thanks for the answer. Yes I am using Javascript but I am new to this so can you please give me an example? I am not able to get the id for the specific tools like what id is assigned to the 'create rectangle'.

(03 Nov '12, 06:50) yash

Hey Gaudenz! You told me to use 'document.getElementById' to shift the tools in respective divs. Can you please tell me how to find the ids of these specific elements? I am asking this coz I am not able to find the usage of id attribute in the docs. Please help!

(05 Nov '12, 03:56) yash

Try using the id attribute as explained here

(05 Nov '12, 04:59) Gaudenz

It worked! Thanks a lot! :)

(05 Nov '12, 06:09) yash

I use extjs + mxgraph.

extjs I use to create toolbar actions (save, print, delete,etc) and mxgraph for drawing using his own toolbar creation like this


answered 03 Nov '12, 12:21

cheyo's gravatar image

accept rate: 33%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 02 Nov '12, 11:55

Seen: 8,547 times

Last updated: 05 Nov '12, 06:09