read a cookie with JavaScript


I don’t know much about handling cookies, so don’t assume I’m a pro when making this request ;)

There is a cookie that is written in the cache. The cookie name is “eapp”, and the following is a complete example of what is written in the cookie:



[url removed, login to view]







I have also attached the cookie.

What I need will be only 3 functions (call them anything you like):

Function #1: I need the first function to be able to read, in this cookie, everything between “CCode=” and “&”. I would then like to have a return on this value, which in this case the function would return “USA633”. This value is not necessarily always 6 characters long.

Function #2: I need the second function to read in the cookie the value after “PID=”. In this case, the value would return “1028896”. This value is always 7 characters long. I will need a return on this value.

Function #3: I would like to read the same cookie, and return "not_available" if the cookie is not found.

You can dump this code in an htm or html file.

As well, can you write an additional code (with [url removed, login to view] or something) to write these values on the page so that I can see right-away that the functions have worked?

Many thanks

Skills: Data Processing, Javascript

See more: c read example, what is javascript, what is a javascript, javascript what is, be a pro, read, net javascript, cookie, html javascript example, dump net, amp javascript, page javascript, javascript amp, read javascript cookies, javascript write, javascript read write cookies, net dump, code read, file cache, javascript net write file, read write data, file javascript read, read code, able read, read file javascript

About the Employer:
( 38 reviews ) Montreal, Canada

Project ID: #211973

1 freelancer is bidding on average $30 for this job


I have already finished the script. My bid is $30, and I will forward the script to you immediately after payment has been sent. Please let me know if you are interested.

$30 USD in 0 days
(2 Reviews)