You can only use var within a function() where it means "declare a variable
in this function's local scope." Outside of a function, don't use it.

Matthew Walker
Electric Sheep Web
http://www.electricsheep.co.nz/

----- Original Message -----
From: "Taco Fleur" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 7:35 PM
Subject: var in cfscript??


> Anyone any idea why I am getting errors when initializing my variables
with "var" in cfscript?
> Scripts that worked before now do not allow the var keyword anymore...
>
> I was getting this a couple of days ago, just ignored it as I could not
figure what in godsname was wrong. Now it's sort of getting annoying, just
started a complete new project from BLANK type in var and get an error
again..
>
> Following is one of the codes that generate the error.
> --------
> <cfscript>
>  var location = "<a href=""index.cfm"">Home</a> &raquo; <a
href=""index.cfm?fuseaction=Search"">Search</a>";
>  var bAppend = false;
>  if ( url.searchType IS "advanced" )
>  {
>   location = location & " &raquo; <a
href=""index.cfm?fuseaction=search&searchType=advanced"">Advanced</a>";
>   bAppend = true;
>  }
> ................................more code
> </cfscript>
>
> The error I get is:
> just in time compilation error
> Invalid parser construct found on line 3 at position 2. ColdFusion was
looking at the following text:
>
> var
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to