Shuffle Generator

Insert a portion of the source into the specified position in the target. The other sections of the target will be shifted to make room for the new portion. The contents of the last section will be discarded.

The shuffle option is very flexible, as the target's can be placed in any order, and in any position within the document. (That's why there isn't a shuffleForward / shuffleReverse operation, shuffle does it all.

This Generator is invoked by inserting the following Java object into the <head> section of the page:

    <object declare classid="HTMLDropOps" title="Any Name Here">
       (More <param> definitions go here...)
    </object>

Use this <param> tag if you want it to respond to drops:

      <param name="drop" value="shuffle">

and/or this <param> tag if you want it to respond to redrops:

      <param name="redrop" value="shuffle">

The <param> values supported are:

numSections

The number of sections to keep before we drop an old one to make way for a new one.

sourceTag

The contents of the <tag> will be inserted into the target. Typically, the <body> tag is used here. One of the sourceTag or sourceId parameters must be set.

sourceId

The contents of the <tag id="sourceId"> will be inserted into the target. One of the sourceTag or sourceId parameters must be set.

targetTag1...

There must be a sequence of target tags / ids, each with their sequence number appended to the end of the name. (See example below.) The new information will be placed at the start of the <tag>. One of the targetTag or targetId parameters must be set.

targetId1...

There must be a sequence of target tags / ids, each with their sequence number appended to the end of the name. (See example below.) The new information will be placed at the start of the <tag id="targetId"> tag. One of the targetTag or targetId parameters must be set.

resultFile

Specifies the name of the file to create from the drop. If this isn't set, the result will be the same as the generator file, with ".htmg" replaced with ".html"

Two special values can be used in this parameter: %source% is replaced by the name of the source of the content, and %target% is replaced by the name of the target file.

The following HTML code will result in the body of the source file being inserted into the first target position (identified by a tag in the target file with an id="target-id-1" attribute). The previous contents of the first position will be moved into the second position (identified by a tag in the target file with an id="target-id-2" attribute). The origional content of the second section will be removed.

    <object declare classid="HTMLDropOps" title="Shuffle Example">
      <param name="drop" value="shuffle">
      <param name="numSections" value="2">
      <param name="sourceTag" value="body">
      <param name="targetId1" value="target-id-1">
      <param name="targetId2" value="target-id-2">
      <param name="resultFile" value="home.html">
    </object>

Later in the document, where we want to have the shuffle take place, we would have a tags like this:

    <div id="target-id-1">
         <p>You could have something here, or not...</p>
    </div>

and

    <div id="target-id-2">
         <p>You could have something here, or not...</p>
    </div>

It doesn't have to be a <div> tag, any tag would do. The <div> tag is convenient for this purpose, however, because it doesn't chang the formatting in any way.