Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.


How to Create a Js File

victor Offline referral

Posts: 638
Joined: Jun 2013
Reputation: 32

Senior Member
I am trying to save this JavaScript code using notepad but for some reason notepad doesn't save it as cookie.js

function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        var expires = "; expires="+date.toGMTString();
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    return null;
function eraseCookie(name) {

How can I create .js file using notepad?
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

Posting Freak
To create a Js (JavaScript) file simply remove the SCRIPT tags and save it as "cookie.js" using notepad Big Grin

User(s) browsing this thread: 1 Guest(s)