Find Jobs
Hire Freelancers

Manipulate Cookie Data

$30-250 CAD

완료함
게시됨 거의 4년 전

$30-250 CAD

제출할때 지불됩니다
Need a javascript function to read and set a cookie. A single cookie, for this example called "cart", to which items can be added and removed. with onclick for item 101, cookie.cart=101 with onclick for item 102, cookie.cart=101-102 with onclick for item 105, [login to view URL] =101-102-105 and so on. Now that cookie cart=101-102-105, a div with id="count" needs to display (3) - count of items in cart. A click on item 102 again would change cookie to cookie.cart=101-105, count=(2) (remove item 102 from cookie data). The script would need to detect that 102 is already in cookie and in place of adding it, remove it. And of course re-save the cookie with the new data. It would need to be as elegant and efficient as possible, taking into account that a new cookie may need to be set at start when one does not exist, and so on. Also, I should be able to limit the amount of items, say 50, that can be stored to a cookie, with a custom message when limit reached. Here is some basic html of the page just for illustration purposes where an onclick event is used setCookie(name,value,days): <!DOCTYPE HTML> <html> <head> <p><div onclick="setCookie('cart','101','1','\')" style="cursor:pointer;">Select 101</div><div onclick="setCookie('sCart','101','1')" style="cursor:pointer; dislay:none;">Remove 101</div></p> <p><div onclick="setCookie('cart','102','1','\')" style="cursor:pointer;">Select 102</div><div onclick="setCookie('sCart','102','1')" style="cursor:pointer; dislay:none;">Remove 102</div></p> <p><div onclick="setCookie('cart','103','1','\')" style="cursor:pointer;">Select 103</div><div onclick="setCookie('sCart','103','1')" style="cursor:pointer; dislay:none;">Remove 103</div></p> <p><div onclick="setCookie('cart','104','1','\')" style="cursor:pointer;">Select 104</div><div onclick="setCookie('sCart','104','1')" style="cursor:pointer; dislay:none;">Remove 104</div></p> <p><div onclick="setCookie('cart','105','1','\')" style="cursor:pointer;">Select 105</div><div onclick="setCookie('sCart','105','1')" style="cursor:pointer; dislay:none;">Remove 105</div></p> <div id="itemcount">0<div> </body> </html> So any time a user clicks any of the links, the javascript will check if that item number is in cookie data. If it is, then remove it from the data string. If it is not, add it to the cookie data string. I have found something similar to what i am after at this link: [login to view URL], look at very last answer on page. However, this is not all of what i need, and i could not get it to work.
프로젝트 ID: 26625316

프로젝트 정보

6 제안서
원격근무 프로젝트
활동 중 4년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
i can do this $60 my price. let me know if you are interested...................................................
$60 CAD 7일에
5.0 (11 건의 리뷰)
4.0
4.0
6 이 프로젝트에 프리랜서들의 평균 입찰은 $83 CAD입니다.
사용자 아바타
Hello sir, I checked requirement and i think this is you need: + need a javascript function to read and set a cookie Why would i benefit you? - I am confident about this project, I can start right now. - I have worked on this field for 6+ years. - I am good at working under pressure and with deadlines - I can work on my own, but I can adapt to be a part of the team if required - I'm a full-time freelancer and I am available to work long hours and on projects that requires working in different time zones - All my previous projects was feedback 5 stars so my service is best choice Hoping that you will review my cover letter and feedback, I am looking forward to hearing from you. Kind Regards
$153 CAD 3일에
5.0 (87 건의 리뷰)
6.5
6.5
사용자 아바타
Hi there, Thank you for sharing your requirement. Hope you are doing good and having a nice day. I'm confident of quality codes and smart work for this task. You can check my rich experience and good reviews for previous similar work on my profile. If you award me this project, we will be glad with good results for each other. Please contact me to discuss your project in detail. Thanks. Best Regards.
$140 CAD 7일에
4.2 (4 건의 리뷰)
3.7
3.7
사용자 아바타
Hey There, Web Developer here. I can create a function to modify your cookie data in just 1 day at a flat price of 50/- function will allow you to add and delete product data from cookie. I am Microsoft certified in Javascript and Computer Networking. I am SQL, PHP and Python certified from University of Michigan. You can check all my certificates. Looking for your response. Thankyou
$50 CAD 1일에
0.0 (0 건의 리뷰)
0.0
0.0
사용자 아바타
I'm good at javascript, with an extensive experience. I think I can give you better solution for the same, as the cookie is not a right solution in your case,as the cookie comes with a limitation of 5mb data. I can give you right solution for this. which will be helpful to you.
$56 CAD 1일에
0.0 (0 건의 리뷰)
0.0
0.0

고객에 대한 정보

국기 (CANADA)
Mississauga, Canada
5.0
1
결제 수단 확인
7월 18, 2020부터 회원입니다

고객 확인

이 거래선이 등록한 다른 일자리

Javascript Cookie Manipulation
$30-250 USD
감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.