close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Boolean Loops With Cookie Behavior

Thread began 8/11/2009 4:29 am by doublehelix3216386358 | Last modified 8/14/2009 8:14 pm by doublehelix3216386358 | 2462 views | 5 replies


Boolean Loops With Cookie Behavior

Be gentle with me, I am quite the novice... ;)

Basic scenario:

I have a page (call it "page 1") with a link to go to a form page. Once complete, this form sets a cookie, and takes users to a download page. On subsequent visits, I would like the users to be able to skip the form page altogether and go directly from "page 1" to the download page.

Through the use of your program, I have got this working, sort of, but it is not ideal.

First, I can get the form to set the cookie, that is easy. It is the redirection that is not as clean as I would like it to be.

I cannot find a way to make the original link on "page 1" send the user to the correct page based on the cookie. I would like that link to make the *decision*, cookie = "yes", go to download page, cookie = "no", go to form page.

What I ended up doing was keeping the link on "page 1" to go to the form page only, but then on the form page, I used the "Redirect based on cookie" behavior, set to "On Load" for a small graphics file on the form page, which sends the user to the download page if the cookie exists. This means that the form page starts to load, but then redirects almost immediately. This causes a bit of a jerky hitch in the transition between "page 1" and the download page for those that already have the cookie.

When I look at the code for the cookie redirection, it looks like this:

"WA_cookieRedirect(WA_CookieObj,document,true,'TB_Download_Form','1','Downloadmusic.html',false)" />

It looks like I should be able to use this code with the original link on "page 1", yet add in a value for the "false" parameter so that the original link will make the decision to do the redirection based on the cookie. I have tried several permutations of this, but I cannot seem to get it to work.

Basically, a Boolean loop... "If, then, else" type of redirection.

Is this possible with this program? If so, would you be so kind as to supply me with the correct syntax?

Thanks in advance.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...