Thanks for that,
We have been considering something along these lines, our problem lies in
that some of our clients put 'no-JavaScript' constraints on us. We also want
to find a way that would mean we avoid having to make sure that all pages
are consistent. For example, we could implement the solution below in a
display handler for the pages, but what happens in the situation where we
are not actually displaying the objects as such, but perhaps just searching
them?
A session variable poses the same problems.
Thanks
Emma

-----Original Message-----
From: Maddison, David [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 11:29
To: Spectra-Talk
Subject: RE: Context Sensitivity


>>  Hi.
>>  Can anyone point me in the right direction for more
>>  information on context
>>  sensitive coding within Spectra. for example, I want to
>>  provide a help
>>  function in my top toolbar which is aware of what object I
>>  am looking at in
>>  my bottom page. At the moment they have no knowledge of
>>  each other at all. I
>>  am reluctant to start using session variables and wonder if
>>  much development
>>  has already been done on similar examples?
>>  Thanks
>>  Emma

Why not use Javascript?  The top bar could check the URL of the page in the
bottom bar, either sending the URL to a help page that could send the
correct help back, or reading a variable in the bottom page that says what
the help page URL is.

You could even use Javascript in the bottom page to automatically tell the
top bar what help url to display.  for example :

<!-- Frameset Code --->
<frameset rows="50%,*">
    <frame name="topbanner">
    <frame name="bottom" src="testbottom.htm">
</frame>

<!-- Javascript code -->
<script>
    window.top.topbanner.location = "http://www.allaire.com/spectra";
</script>

wrap this javascript code in a custom tag:

<CFPARAM Name="Attributes.URL">

<CFHTMLHEAD Text="
<script>
top.topbanner.location = 'http://#Attributes.URL#';
</script>">

and you've got an easy way to specify the help page!

-Maddog
wildfusion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to