So you want to know how thread works huh?

Well here is a 200ft tutorial on getting started with this cool tool.

1)Download thread.html and create threadlist.html - put them in your configuration/commands/ subdir

2)restart DW

3)Go to some site you've defined

4)select commands - create threadlist

5)Pick an object that has a NAME defined - like say a table.

6)selects commands - threads

7)You will see a number of fields. the blue area shows you the currently attached threads. Since this is your first time, click NEW.

8) Choose a property of the current object you want to "monitor" - say with a table, you choose "border"

9) Choose whether the script runs in one of three cases:

  1. always
  2. whenever this property changes (to any new value)
  3. whenver this property's value is equal to the value you define

10) For now, choose "always"

11) In the Script area, you put your javascript code that can do edits directly to the page. This is like a command line direct to Dreamweaver's DOM. You have 3 pre-set objects you can use in your scripts:

  1. myProperty - equal to the text value of the property name you are "watching"
  2. myValue - equal to the text value of the property you are "watching"
  3. myObjNode - the DOM object of the element you selected before you opened Threads. So you could do things like

12) Assuming you have a table selected when you opened this Command, type in the following code:

alert("changing table"" width to 100%");


13) Now hit UPDATE to save your changes

14) Now hit RUN to run all the threads. Every thread defined for EVERY object you have set in your page get's run/tested.

15) You should see first an alert that says HI - this is just a test that will be removed in a later version. You can delete this thread by going into the threadlist.html and removing the first thread tag you see there.

16) you should then see the alert for the "changing table whatever width to 100%" and your table should now become 100% wide.

17) Try out the other options. NOTE: when you use the "whever value changes" option, and you hit UPDATE, this script wont trigger until you subsequently change this property value - meaning that when you hit UPDATE it stores the current value of that property for later reference.

18) You can also do cool stuf like popUpCommand() or popUpAction() - basically anything you could do with commands.

19) Make sure you NEVER name a thread the same name as another thread - otherwise funny things will happen. If you accidently do, open the threadlist.html and rename them to be different.