Cookies -vs- DB Table

S

Scott

On an Intranet Web application I'm working on, I need to
display a Pop-up that shows the users what report changes
have occurred. This may happen once a week or more and I
need a way for the users to turn-off this Pop-up after
they've reviewed the changes.

Currently, I'm debating whether to use cookies or build a
table that will set flags. I'm not sure what the best
solution to take would be. Does anyone know what would be
the best solution? I don't like the idea of using Pop-
ups. I'd rather have a link for the user to click that
shows the report changes, but my client wants to use pop-
ups.

If I use cookies, how do I create one, and how do I update
it so it knows when to and when not to display a pop-up?
I've never created a cookie before, so if someone has some
sample code that would helpful.

As for the Pop-up, I've seen pop-ups that loads a new
instance of IE, and I've seen pop-ups that look embedded
in the current instance of IE with a close option. I
would like to create the latter pop-up? Has anyone done a
pop-up like the embedded one before? If so, where can I
find some sample code on how to create one?

Thanks,

Scott
 
B

Bob Barrows

Scott said:
On an Intranet Web application I'm working on, I need to
display a Pop-up that shows the users what report changes
have occurred. This may happen once a week or more and I
need a way for the users to turn-off this Pop-up after
they've reviewed the changes.

Currently, I'm debating whether to use cookies or build a
table that will set flags. I'm not sure what the best
solution to take would be.

It doesn't much matter. The database solution would be better if there was a
chance that users might shut off cookies on their machines.
Does anyone know what would be
the best solution? I don't like the idea of using Pop-
ups. I'd rather have a link for the user to click that
shows the report changes, but my client wants to use pop-
ups.

If I use cookies, how do I create one, and how do I update
it so it knows when to and when not to display a pop-up?

A Google search would turn up tons of examples. Try these keywords: asp
cookies example
See here for the documentation:
http://msdn.microsoft.com/library/en-us/iisref/htm/ref_vbom_reqo.asp
I've never created a cookie before, so if someone has some
sample code that would helpful.

As for the Pop-up, I've seen pop-ups that loads a new
instance of IE,

client-side code:
window.open
window.showmodaldialog
window.showmodelessdialog
and I've seen pop-ups that look embedded
in the current instance of IE with a close option.

more client-side code:
use a div which can be positioned absolutely and dynamically hidden and
displayed

See here for dhtml documentation:
http://msdn.microsoft.com/workshop/author/dhtml/dhtml_node_entry.asp

With either method, you will probably need to use an XMLHTTP object to
periodically open a page on the server which will return the information
contained in the cookie or database. A Google search should find you some
examples of doing this.

I
would like to create the latter pop-up? Has anyone done a
pop-up like the embedded one before? If so, where can I
find some sample code on how to create one?
Client-side coding questions are off-topic on this newsgroup. ASP is
server-side technology, so if you have any more questions about creating
cookies or querying your database, follow-up with us.

For the pop-up questions, follow-up in a client-side newsgroup: look for one
with "dhtml" in its name, or try one of the scripting newsgroups, depending
on whether you wish to use vbscript or jscript (recommended) in the
client-side code.

HTH,
Bob Barrows
 
A

Aaron Bertrand [MVP]

It doesn't much matter. The database solution would be better if there was
a
chance that users might shut off cookies on their machines.

Well, unless the OP was planning to use a cookie to identify the data in the
database as belonging to that user. :)

In an intranet, of course, there are other ways...
 
B

Bob Barrows

Aaron said:
Well, unless the OP was planning to use a cookie to identify the data
in the database as belonging to that user. :)

In an intranet, of course, there are other ways...

Yes, in an intranet app, I take it for granted that Windows Authentication
is going to be used ...

Bob
 
B

Bhaskardeep Khaund

Hi,

I think you should use a database table instead of cookies. Its a better way.

Regards,
Bhaskardeep Khaund
Bob Barrows said:
Well, unless the OP was planning to use a cookie to identify the data
in the database as belonging to that user. :)

In an intranet, of course, there are other ways...

Yes, in an intranet app, I take it for granted that Windows Authentication
is going to be used ...

Bob
 
S

Scott

This is my thought as well. This client I work for
doesn't do analysis. They prefer to do adhoc with
multiple releases rather than perform analysis properly.
-----Original Message-----
Hi,

I think you should use a database table instead of cookies. Its a better way.

Regards,
Bhaskardeep Khaund
"Bob Barrows" <[email protected]> wrote in
message news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,142
Messages
2,570,817
Members
47,363
Latest member
eitamoro

Latest Threads

Top