Click here to Skip to main content
15,914,500 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: dynamic event - pass value Pin
Hanzaplast14-Sep-10 23:34
Hanzaplast14-Sep-10 23:34 
QuestionjQuery/jTemplate question [Solved] Pin
RCoate9-Sep-10 18:52
RCoate9-Sep-10 18:52 
AnswerRe: jQuery/jTemplate question Pin
Pete O'Hanlon15-Sep-10 0:47
mvePete O'Hanlon15-Sep-10 0:47 
GeneralRe: jQuery/jTemplate question Pin
RCoate21-Sep-10 18:33
RCoate21-Sep-10 18:33 
GeneralRe: jQuery/jTemplate question Pin
Pete O'Hanlon22-Sep-10 2:27
mvePete O'Hanlon22-Sep-10 2:27 
AnswerRe: jQuery/jTemplate question [Solved] Pin
Sunasara Imdadhusen4-Oct-10 1:49
professionalSunasara Imdadhusen4-Oct-10 1:49 
Questionprotecting javascript IP Pin
swjam3-Sep-10 17:24
swjam3-Sep-10 17:24 
AnswerRe: protecting javascript IP Pin
DaveAuld4-Sep-10 4:16
professionalDaveAuld4-Sep-10 4:16 
Obfuscate the client side scripting.

Here is an example site for doing just that;
http://www.javascriptobfuscator.com/[^]

I ran some code through and here is the example input and output;
Java
// -------------------------------------------------
// Saves options to localStorage.
// -------------------------------------------------
function save_options() {

    //Get the current saved memberID
    var currentID = localStorage["memberID"];
    var newID = textMemberID.value;

    if (!(currentID == newID)) {
        //memberID has changed
        //Save the new memberID
        localStorage["memberID"] = newID;

        // Update status to let user know options were saved.
        if (localStorage["memberID"] == newID) {
            save_status.innerHTML = "MemberID: " + localStorage["memberID"] + " saved to local storage.";
            setTimeout(function () { save_status.innerHTML = ""; }, 1000);

            //Clear Saved Data
            var newRep = new Array();
            for (i = 0; i < 9; i++) {
                newRep[i] = "0";
            }

            //Update the stored Rep Data to 0 values
            setNewRepDetail(newRep);

            //Clear the table
            clearTable();

            //Reload the Page
            reload_Page();
        }
        else
        { save_status.innerHTML = "Error saving MemberID to localStorage."; }

    }
    else {
        save_status.innerHTML = "MemberID: has not changed.";
        setTimeout(function () { save_status.innerHTML = ""; }, 1000);
    }

}

Output;
Java
var _0x9c0d=["\x6D\x65\x6D\x62\x65\x72\x49\x44","\x76\x61\x6C\x75\x65","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x4D\x65\x6D\x62\x65\x72\x49\x44\x3A\x20","\x20\x73\x61\x76\x65\x64\x20\x74\x6F\x20\x6C\x6F\x63\x61\x6C\x20\x73\x74\x6F\x72\x61\x67\x65\x2E","","\x30","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x4D\x65\x6D\x62\x65\x72\x49\x44\x20\x74\x6F\x20\x6C\x6F\x63\x61\x6C\x53\x74\x6F\x72\x61\x67\x65\x2E","\x4D\x65\x6D\x62\x65\x72\x49\x44\x3A\x20\x68\x61\x73\x20\x6E\x6F\x74\x20\x63\x68\x61\x6E\x67\x65\x64\x2E"];function save_options(){var _0xa035x2=localStorage[_0x9c0d[0]];var _0xa035x3=textMemberID[_0x9c0d[1]];if(!(_0xa035x2==_0xa035x3)){localStorage[_0x9c0d[0]]=_0xa035x3;if(localStorage[_0x9c0d[0]]==_0xa035x3){save_status[_0x9c0d[2]]=_0x9c0d[3]+localStorage[_0x9c0d[0]]+_0x9c0d[4];setTimeout(function (){save_status[_0x9c0d[2]]=_0x9c0d[5];} ,1000);var _0xa035x4= new Array();for(i=0;i<9;i++){_0xa035x4[i]=_0x9c0d[6];} ;setNewRepDetail(_0xa035x4);clearTable();reload_Page();} else {save_status[_0x9c0d[2]]=_0x9c0d[7];} ;} else {save_status[_0x9c0d[2]]=_0x9c0d[8];setTimeout(function (){save_status[_0x9c0d[2]]=_0x9c0d[5];} ,1000);} ;} ;

Dave

Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn

GeneralRe: protecting javascript IP Pin
NeverHeardOfMe4-Sep-10 5:47
NeverHeardOfMe4-Sep-10 5:47 
GeneralRe: protecting javascript IP Pin
DaveAuld4-Sep-10 5:49
professionalDaveAuld4-Sep-10 5:49 
QuestionclearInterval Not working on IE Pin
greendragons3-Sep-10 3:46
greendragons3-Sep-10 3:46 
AnswerRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 4:11
mentorNot Active3-Sep-10 4:11 
GeneralRe: clearInterval Not working on IE Pin
greendragons3-Sep-10 4:16
greendragons3-Sep-10 4:16 
GeneralRe: clearInterval Not working on IE Pin
phil.o3-Sep-10 4:23
professionalphil.o3-Sep-10 4:23 
GeneralRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 4:27
mentorNot Active3-Sep-10 4:27 
GeneralRe: clearInterval Not working on IE Pin
DaveAuld3-Sep-10 5:10
professionalDaveAuld3-Sep-10 5:10 
GeneralRe: clearInterval Not working on IE Pin
DaveAuld3-Sep-10 5:09
professionalDaveAuld3-Sep-10 5:09 
AnswerRe: clearInterval Not working on IE Pin
NeverHeardOfMe3-Sep-10 11:44
NeverHeardOfMe3-Sep-10 11:44 
GeneralRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 17:11
mentorNot Active3-Sep-10 17:11 
GeneralRe: clearInterval Not working on IE Pin
NeverHeardOfMe3-Sep-10 22:29
NeverHeardOfMe3-Sep-10 22:29 
GeneralRe: clearInterval Not working on IE Pin
Not Active4-Sep-10 3:44
mentorNot Active4-Sep-10 3:44 
GeneralRe: clearInterval Not working on IE Pin
greendragons4-Sep-10 22:44
greendragons4-Sep-10 22:44 
GeneralRe: clearInterval Not working on IE Pin
NeverHeardOfMe4-Sep-10 23:30
NeverHeardOfMe4-Sep-10 23:30 
GeneralRe: clearInterval Not working on IE Pin
greendragons4-Sep-10 23:56
greendragons4-Sep-10 23:56 
Questiononmouseorver for child element Pin
greendragons3-Sep-10 2:13
greendragons3-Sep-10 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.