Forums

This topic is locked

Conditonal Region 2 (CR 2)

Posted 06 Sep 2001 09:12:13
1
has voted
06 Sep 2001 09:12:13 oscar michel posted:
I am constructing a series of pages that will work together to provide access to different forms for members. I have created a log-in page that uses Macromedia's log-in SB, which grants access to a welcome page. The log-in page creates two session variables: username and access level. The welcome page recognizes the user via the username session variable and should display links to the members corresponding forms, in accordance to their access level session variable. I want to employ the Conditional Region 2 (CR 2) SB to show the members' links to their corresponding forms. For example a member that is classified as having an access level of "cars" should see the links to the cars form on the welcome page. I am thinking of using CR 2 like this; "Show selected region( a table with links to car forms) if Request.SessionVariable equals session(car)." Am I using the Sb correctly? Am I using the correct objects, is the Request.SesionVariable object correct?

Replies

Replied 06 Sep 2001 13:00:27
06 Sep 2001 13:00:27 Waldo Smeets replied:
You should do something like this:
Show selected region if Request.Session("access" equals "cars".

You can use the Request Variable and Script behavior for this. Do not forget to type "cars" (so with the "" in the script box.

Hope this helps.

Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 06 Sep 2001 21:42:47
06 Sep 2001 21:42:47 oscar michel replied:
My original posting was erroneous in that I had misread Request.ServerVariable as Request.SessionVariable (R.SesV). CR 2 does not contain R.SesV in the Request drop down menu. I tried selecting Request and typing .Session("access" in the name box and typing "cars" in the script box, but it didn't work. The code had paranthesis all over the place, (Request(".Session("access"").

I was able to get the desired effect with the following code:
'&lt;% IF (CStr(Session("access") = "cars" THEN %&gt;
&lt;-- &lt;table&gt; --&gt;
&lt;-- &lt;/table&gt; --&gt;
'&lt;% END IF %&gt;

I would still like to know if CR 2 is capable of executing the desired effect.

Thanks for the prompt response.

oscar

Replied 06 Sep 2001 21:49:49
06 Sep 2001 21:49:49 Waldo Smeets replied:
Sure. I stay to my description as above <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic