Bluevoss wrote:Ahh! Now it all makes sense
Seriously, it does. I found that {} jump and assumed that it was actually a clickless move to the next section. But no, having read what you said, I'll have to turn my brain around and look at this differently. I guess the {} jump really isn't a good idea. It isn't going there - it's inserting the section HERE.
Still, I'll have to see if there is some use for this trick.
Ya - I think this is more on-track. But . . . I'd rather say it inserts, not the section itself, but (whatever in the section IS NOT code) HERE. If the section is all JS, or @ commands, nothing happens at all.
I don't know if this adds anything to the conversation, but for what it's worth:
@start Begin
[[Begin]]:
This is the beginning. Now, let's 'embed' the content of another section: {Middle} Did I just "jump" to another section? No -- I just embeded the text content from the Middle section. The Middle section embeds the text content from the End section, so embedding 'Middle' embeds 'End' here as well.
That "null" you see above, is because Squiffy is trying to display an attribute ("JTxt") value without the attribute having been set. Jumping (by clicking) to the Middle section will set the value, and display a whole sentence instead of "null".
<b>If the embed-text thingy had actually "jumped" to another section, the hyperlink for Middle (" jump " below) would be disabled.</b>
Now -- let's [[" jump "]](Middle) to the Middle section.
[[Middle]]:
var jumpText =
"<p style='color: blue';><i><b>You jumped here ('Middle'), by clicking, so the JS code to set the value of the 'JTxt' attribute is recognized and activated, and you see this blue sentence. You see the same thing from the End section, because the End is embedded, not 'jumped to' with a click, or JS 'story.go' command.</b></i></P>"
set("JTxt", jumpText);
<p style = "color:blue";>
{JTxt}
</p>
<p style="color: chocolate"><b><big>
This is from the 'middle' section.</big></b>
</p>
{End}
[[End]]:
set("Jtxt", "JTxt is reset");
@set JTxt = "JTxt is reset"
<p style = "color: red";>
This is in the End section.
<br>
This End section includes both JS and Squiffy code to set the JTxt attribute to "JTxt is reset".
</p>
{JTxt}