Be a Supporter!

COOKIE setting & retrieving in JS!

  • 376 Views
  • 10 Replies
New Topic Respond to this Topic
RichL
RichL
  • Member since: Apr. 2, 2000
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
COOKIE setting & retrieving in JS! 2001-08-08 17:15:46 Reply

After a failed attempt at cookie setting and retreiving with PHP (the script i was trying to use it on wouldnt parse it...thats another story!). Im now trying to work out how to Set a cookie using Javascript..and then if a user tried to submit his post again..WITHIN AN HOUR (another thing i need..to self delete in an hour)..the javascript would read the cookie and deny the user access to add another post. Basically what i needed before- but with Javascript.

Thanks

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-08 21:41:06 Reply

I don't know about others, but I'm really tired of this shit. We're not about to write up a quick tutorial for you! Go look it up online, haven't you ever used a search engine??

Stop asking vague, general, unclear, dumb questions!

RichL
RichL
  • Member since: Apr. 2, 2000
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 06:57:30 Reply

Stop asking vague, general, unclear, dumb questions!

Vague, general, unclear and dumb huh. I thought the words SETTING, RETRIEVING, COOKIES and JS were perectly good questions.

:Go look it up online, haven't you ever used a search engine??

yes i have used a search engine, and have not to date found a site that states what i need to know. It gives me a simple piece of code..but does it tell me how to set it for an hour? does it tell me how to retreive the cookie..and if it is there tell the user they cant post within the hour? like fuck it does. I ask you guys because you normally help out- well, i cant recall ever you helping out, just insulting me and others.

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 08:50:52 Reply

Ok, let me explain this to you like you're a 5-year-old: You go to www.yahoo.com. You then search for "setCookie time javascript."

This is what I found on the first page (and I didn't even get through half of it):

http://www.bruce-hamilton.com/tutorials/cookies.shtml
http://www.webreference.com/javascript/961125/part01.html
http://members.ozemail.com.au/~dcrombie/cookie.html
http://javascript.internet.com/cookies/only-popup-once.html
http://www.netkontoret.dk/jscookies.htm

All these links show you how to get, set a cookie, and how to set the expiration date/time. There, I rest my case.. I hope you feel like an idiot that you are now!

RichL
RichL
  • Member since: Apr. 2, 2000
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 09:23:00 Reply

I hope you feel like an idiot that you are now!

I have no experience with javascript whatsoever, the link you found still dont give me what i need. I use google for my searching- so yeah, i now know how to set a cookie..but i STILL dont know how to retreive it..and if it is there kill the page loading and display an error message.

AGAIN- you need to stop with the insults, whats the fucking point to them? If you dont want to help- DONT.

COOKIE setting & retrieving in JS!

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 10:24:54 Reply

At 8/9/01 09:23 AM, RichL wrote:
I hope you feel like an idiot that you are now!
I have no experience with javascript whatsoever, the link you found still dont give me what i need. I use google for my searching- so yeah, i now know how to set a cookie..but i STILL dont know how to retreive it..and if it is there kill the page loading and display an error message.

AGAIN- you need to stop with the insults, whats the fucking point to them? If you dont want to help- DONT.

getting the cookie is explained very clearly in most of these links. my point is to get you to stop spamming the forum with this shit and use your brain for a change.

and don't change the fuckin topic, your original question was how to set/get a cookie and how to set the expiration date on it. Well i gave you half a dozen links that i found in less than 5 minutes, which all explain how to do it. anyone who has ever done any JavaScript can read it and understand it easily. If you can't, then you shouldn't be touching a computer.

so there's my points, one more time.. just in case you missed it.. since you miss everything..

stop asking general questions for which there are plenty of answers out there in search engines! the point of this forum is to ask for help on specific issues.. like: "ok, I'm tryin to set a cookie by doing setCookie(blah blah), but I get this kind of error: Error: blah blah." this forum is not for people to ask "oh yea, I wanna set a cookie and I looked all over and I don't know how to do it." first of all, you haven't looked all over if you're asking that question. and secondly, no one feels like tutoring you through the whole thing.

do you get my point now? i hope you do. will you change your ways in NG BBS/Programming? probably not, but I'm really hoping you do.

from this point on, any stupid comments/questions by you or another lazy asshole, who doesn't bother to do some reading, will be ignored.

thank you, good bye.

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 10:35:52 Reply

At 8/9/01 06:57 AM, RichL wrote: i cant recall ever you helping out, just insulting me and others.

Umm, I remember the topic you posted about "Skinning Web Pages using PHP", and I quite clearly remember Mb writing out several blocks of code for you...

What you have to remember is that most of the people who respond to topics like this are in the working world and are used to getting paid for coding. The computing community is going more the open source route, but that doesn't mean to say that you're going to get a hand out every time you ask for it (afterall, the whole point of open source is to benefit from mutual contribution).

I taught myself pretty much everything I currently know about coding (and I'm still way off knowing anything near as much as I want to), and only really turn to people for guidance now and then, or as a last resort. You should try doing that....

RichL
RichL
  • Member since: Apr. 2, 2000
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 11:36:46 Reply

You both have great points- i have taught myself advanced HTML, am now alot better at PHP, the master at MySQL- and have acheived most of the basic stuff i needed to know thru you guys and this forum. Its hard for me to find a site which doesnt have large pre-made scripts that are too complicated and intertwining for me to understand. And then theres sites which have tiny bits of code..but they dont have all of which i need to put the whole thing together and therefore is my problem.

I didnt know where to start with this. As i am used to javascript reference sites such as javascriptsource and others..of which present scripts for certani purposes, such as "cookie remembers users favourite background"..which hasnt the right functions in it to allow me to change it to do what i want it to do.

So i posted a clueless message in the forum, and beleive me- it was as a last resort. I dont like annoying people with my questions. But if no-one asks questions then no-one gets answers, thus my post. Pissing people off was not the point of the post. COOKIE setting & retrieving in JS was.

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-09 17:13:54 Reply

Ok, your best bet would be to get a JavaScript book. Preferably by O'Reily. This way, you can have all JavaScript functionality available to you and not just 2 or 3 function examples. You can get one for around $20US.

MAXIMINA
MAXIMINA
  • Member since: Aug. 5, 2001
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to COOKIE setting & retrieving in JS! 2001-08-10 01:28:18 Reply

At 8/8/01 05:15 PM, RichL wrote: After a failed attempt at cookie setting and retreiving with PHP (the script i was trying to use it on wouldnt parse it...thats another story!). Im now trying to work out how to Set a cookie using Javascript..and then if a user tried to submit his post again..WITHIN AN HOUR (another thing i need..to self delete in an hour)..the javascript would read the cookie and deny the user access to add another post. Basically what i needed before- but with Javascript.

Thanks
<deleted>
Response to COOKIE setting & retrieving in JS! 2001-08-12 07:37:06 Reply

lol