Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Cookie check and redirect

Reply
Thread Tools

Cookie check and redirect

 
 
fahrenheit@fahrenheitcreative.com
Guest
Posts: n/a
 
      05-14-2007
Our client has asked that we things up so that the user must fill out
a short form with some basic information if they want to access a
number of PDFs on their website, once per session (please don't ask me
why). Submitting the form sets a session cookie.

Specifically, if the user clicks on "example.pdf," I'd like to have
one of two things happen:

1) If the session cookie is set, the PDF is accessed transparently.

2) If the session cookie is not set, the user is sent to the info
form, and on submission is either (a) passed through to the PDF they
clicked the link for, or (b)at least is sent back to the original page
where the link resides so they can select it again. My initial thought
for the latter case was to have the form open in a new window, then
have a close button on the subsequent confirmation page so the
original page is still open in the background.

My apologies if this seems a clunky way of doing things; my experience
with javascript is fairly limited. Any help would be appreciated.

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      05-14-2007
wrote on 14 mei 2007 in comp.lang.javascript:

> Our client has asked that we things up so that the user must fill out
> a short form with some basic information if they want to access a
> number of PDFs on their website, once per session (please don't ask me
> why). Submitting the form sets a session cookie.
>
> Specifically, if the user clicks on "example.pdf," I'd like to have
> one of two things happen:
>
> 1) If the session cookie is set, the PDF is accessed transparently.
>
> 2) If the session cookie is not set, the user is sent to the info
> form, and on submission is either (a) passed through to the PDF they
> clicked the link for, or (b)at least is sent back to the original page
> where the link resides so they can select it again. My initial thought
> for the latter case was to have the form open in a new window, then
> have a close button on the subsequent confirmation page so the
> original page is still open in the background.
>
> My apologies if this seems a clunky way of doing things; my experience
> with javascript is fairly limited. Any help would be appreciated.


It seems to me you expect this NG to be a free programming service?

You could be right, but I doubt it.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
fahrenheit@fahrenheitcreative.com
Guest
Posts: n/a
 
      05-14-2007
On May 14, 3:32 pm, "Evertjan." <exjxw.hannivo...@interxnl.net> wrote:
> wrote on 14 mei 2007 in comp.lang.javascript:
>
> It seems to me you expect this NG to be a free programming service?
>
> You could be right, but I doubt it.


A pointer in the right direction doesn't seem unreasonable to ask for,
though I could be mistaken.

Then again, as I haven't had the need to check this newsgroup before,
I may have misjudged the level of help available here; my apologies.

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      05-14-2007
wrote on 14 mei 2007 in comp.lang.javascript:

> On May 14, 3:32 pm, "Evertjan." <exjxw.hannivo...@interxnl.net> wrote:
>> wrote on 14 mei 2007 in comp.lang.javascript:
>>
>> It seems to me you expect this NG to be a free programming service?
>>
>> You could be right, but I doubt it.

>
> A pointer in the right direction doesn't seem unreasonable to ask for,
> though I could be mistaken.
>
> Then again, as I haven't had the need to check this newsgroup before,
> I may have misjudged the level of help available here; my apologies.


You should perhaps apologise to yourself, as you seem to thinkg you did
something against the NG.

A pointer is simple, learn some javascript, read the NG faq and try some
code. Tell us where you go wrong.

comp.lang.javascript FAQ - http://jibbering.com/faq/index.html

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
session cookie and presist cookie? =?Utf-8?B?amVycnkueHVkZGQ=?= ASP .Net 1 03-08-2006 12:16 AM
What is different between Request.Cookie and Response.Cookie ad ASP .Net 2 01-27-2006 12:54 PM
Cookie Question (IP as domain and cookie file location) =?Utf-8?B?UGF1bA==?= ASP .Net 1 01-10-2006 08:37 PM
Cookie and Session Cookie Questions. Shapper ASP .Net 1 04-27-2005 11:20 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57