Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    invalid assignment left-hand side

    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?

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by 2simple View Post
    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.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Arbitrator, check your PM please.

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by 2simple View Post
    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.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #5
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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?
    Last edited by 2simple; 08-22-2008 at 03:26 PM.

  • #6
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by 2simple View Post
    yes, yes that's what i'm trying to do.. how to disable this func?
    Try:setcookie_redirect=function(){};

  • #7
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    no =( what else can you recommend?


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •