HTML - Cookies
I was hoping you could help me with a problem that came up at work today since I've never worked with this sort of thing before - cookies. This has to do with affiliate marketing. To put things short, my company uses cookies to track the referrer's username (ie the person through whom new users register). This is in turn tracked by our servers and the affiliates are paid a commission for every referral.
Basically this process works perfectly in firefox, safari and chrome browsers but not in internet explorer. It seems to be quite random because it does work on the rare occasion but it mostly doesn't save the cookies that contain the username of the affiliate and therefore we cannot track the referrals made through internet explorer by the users. Do you have any idea or experience regarding this? By the way, this is done through a tracking url using redir.cgi and adding the values in the address itself (for example: http://www.---.com/cgi-bin/redir.cgi...le=123&lang=en). I've tried to research about what might be the cause of the problem but all I found were other people complaining that internet explorer gives problems but no solutions. Do you have any idea how this tracking works? Thanks a lot, I would appreciate your help Similar Tutorialshi, what is cookies and sessions .I have listen many times but don't know.. If u know plz tell. Thanks, web development Cookies?! What are they and do I really need one? By the way, check this out www.esaurome.com/index.html and tell m what you think... Also, is it better to give files a .htm or .html extension? Any difference between the 2? Hi Guys, Hope this is the correct forum for this thread. How do you put a cookie on someones computer when they visit your website? Thanks Is there any way that cookies will work with frames that are showing a site on a different server? Help Me With Cookies, HTML and IE8 For complex reasons, I have to use HTML with JavaScript to set a cookie. I know it is easy to set and get cookies PHP but I have to put the code in HTML. I have searched the internet for some examples and I ran a test based on an example. I ran this Javascript code: Code: <SCRIPT LANGUAGE="JavaScript"> function putCookie() { cookie_name = "specialcookiehuge"; if(document.cookie != document.cookie) { index = document.cookie.indexOf(cookie_name); } else { index = -1; } if (index == -1) { document.cookie=cookie_name+"; expires=Monday, 04-Apr-2020 05:00:00 GMT"; } } </SCRIPT> I tested this code by placing alert statements and I nkow that the line: Code: document.cookie=cookie_name+"; expires=Monday, 04-Apr-2020 05:00:00 GMT"; gets run. I tried to find this cookie (Tools -> Internet Options -> Browsing History ->Settings) And I did not find anything named "specialcookiehuge" in "View Objects" or "View Files". I guess I could try other browsers, but it would be good to know what I am doing wrong. I do not know if I am really setting a cookie. Is there some additional javascript command I am missing? Or, is the cookie being set but I am not looking in the right place according to the tutorials I saw online? Hi, i have the following form, it doesnt do much: Code: <form method="post" > <INPUT TYPE=TEXT SIZE=40 NAME=data value=""> <br> <INPUT TYPE=TEXT SIZE=40 NAME=data value=""> <br> <input TYPE=SUBMIT NAME=data value="Login" > </form> I would like the values to be filled in by obtaining data from a cookie, the function which which gets the cookie data is the following: Code: function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if(c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } Just wondering if anyone could help me call this function from the form, so that i can fill in the values. Thanks Hello (this may sound like a confusing post), I have a website that I recently created, and am having some trouble with newly updated pages loading. I had the site set up and finalized, and I uploaded it through my ftp program. The site works fine, then I was instructed to change certain pages. Since I changed certain pages, I have to now refresh each page I go on in order to see the new updated pages (since I already viewed the page on my computer, and it's set in my cookies). I know that I can delete the cookies on my own computer, but I want people who don't know how to do that who have already viewed the webpage, to be able to come back to the site and automatically see the page updates. So in a nutshell - all I want to know is if there is a code I can place in my html that will make it so my site is not stored in anyones cookies. Thanks in advance to anyone who offers suggestions or advice!! hi all. i need this for an assignement so all help greatly appreciated. thank you in advance. i just need to have an input box where somebody puts their name and then it displays it on the page using innerHTML and then it also remembers it for the next time they visit. also a cookie clearer would be good? if anybody knows of any code anywhere that might be commented to help me out that would be great. im finding it hard to search for this on google and throughout this forum. thank you again. this is what ive got already..... HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <script type="text/javascript"> //<![CDATA[ window.onload = init; function init() { document.getElementById("my_form").onsubmit = parse_form; } function parse_form() { var visitor_name = document.getElementById("visitor_name").value; var el = document.getElementById("message"); if (visitor_name) { el.innerHTML = "Welcome, " + visitor_name; } else { el.innerHTML = ""; } return false; } //]]> </script> </head> <body> <div id="message"></div> <form id="my_form"> <p>Please enter your name:</p> <input type="text" id="visitor_name" /> <input type="submit" value="Submit" /> </form> </body> </html> Hi, I have a final project due in 3 hours for javascript class. I need to use cookies to change a stylesheet on a page and keep it consistent on every page until the user changes it. The link is http://www-scf.usc.edu/~javery/itp204/finalproject.html Its a dumb page about my cat. Anyway if you view the source, a lot of the javascript is for the style switch. The user is supposed to switch styles and click Save Style and then it sets that style for every other page. The code is in the other pages too. The style switches but it doesnt save. If anyone can help me it'd be much appreciated! Joel Could someone please tell me how to update or change a visitor's Cache and/or Cookies when they visit my web page. My company has requested numerous updates to the site since it was launched and they are worried some of their clients won't see the changes because they visited the page before the changes were made. The site was created in Flash and is nested in one HTML page. Thanks in advance. Hello. I have a small script developed for tracking sales. The script randomly generates a "transaction ID" by creating a random number when a user visits the thank you page. It works great, however there is one problem: when a repeat user comes back, it generates a NEW transaction ID and logs a second "sale" when in fact its just a repeat visit. How can I modify this script to remember the transaction ID for each user? I was thinking creating a cookie with the transaction ID would be the simplest way, however I'm not sure. If you can help me decide which way is best, and then show me how to implement this I will be very greatful. Basically I think I would need some sort of second variable, and a script that runs to check for a cookie. If cookie is present, replace "$random_number" with "transaction ID". else if no cookie is present, generate a new number with $random_number. Heres the code: Code: <!------- Random Number Generator For Pixel ----------> <?php srand ((double) microtime( )*1000000); $random_number = rand(0,100000); echo "<script src='https://users.domain.com/sale_third/49.95/$random_number/OPTIONAL_INFORMATION'></script> <noscript><IMG SRC='https://users.domain.com/track_sale/49.95/$random_number/OPTIONAL_INFORMATION'></noscript>"; ?> <!------- End Random Number Generator For Pixel ----------> Thanks in advance. Hi. I am trying to create a page containg 2 frames, right frame, and mainFrame. I am using the right frame to allow users to click links to remote sites browsable within the mainFrame. However, most of these sites require cookies and keep opening links in a new window. Is there a way to enable 3rd party cookies within frames, and to also disable links within the mainFrame from opening in a new window? p.s. I know Firefox allows users to use 3rd party cookies in frames. Thanks |