View Full Version : invalid assignment left-hand side

08-22-2008, 07:28 AM
hi there. could u help me pls to resolve this problem. i want to disable function so i wrote this code:

if(getCookie('auto_lang') != null){
setcookie_redirect() = false; // ff console points to =

this script works as i want but firefox error console says:
invalid assignment left-hand side.

whats wrong?

08-22-2008, 07:52 AM
whats wrong?You canít assign a function a value with the assignment operator (=). Maybe setcookie_redirect is a variable (instead of a function) and you put parentheses after it by mistake; I canít really tell what youíre trying to do based upon what little information that youíve provided.

08-22-2008, 09:02 AM
Arbitrator, check your PM please.

08-22-2008, 11:26 AM
Arbitrator, check your PM please.I looked that over and I still canít really tell what, exactly, youíre trying to do with setcookie_redirect() = false;. If you simply donít want it to be possible to run setcookie_redirect, remove all access points to the function via document.getElementsByName("f").item(0).removeChild(document.getElementById("hoho")); and changing the subsequent if statement into an else if statement.

08-22-2008, 04:17 PM
If you simply don’t want it to be possible to run setcookie_redirect

yes, yes that's what i'm trying to do.. how to disable this func?

Arty Effem
08-22-2008, 04:38 PM
yes, yes that's what i'm trying to do.. how to disable this func?Try:setcookie_redirect=function(){};

08-22-2008, 04:52 PM
no =( what else can you recommend?