> 1) Can I call a JavaScript function from CF?
> Smth. like <CFSET x = f(y)>
> where f is a JavaScript function.
> I tried <CFSET x = f(y)>, but it didn't work.
No, you can't directly call a JavaScript function from CF; CF generates
documents on the server, which are then sent back to the client, where any
JavaScript will execute. You can use CF to write JavaScript, and you can use
JavaScript to execute HTTP requests, and that's essentially the limit of any
cross-communication between them.
> 2) How do I manage strings containing special characters as
> dbl. quote (i.e. ")
> Should I prefix them with something.
> I'd like to have an output like
> say "hello"
In CF, you can escape a double quote by doubling it:
"This is my string, and ""this"" is double-quoted."
> 3) How can I get the value of each field in a query string?
> I know the #cgi.query_string# which returns the entire
> query string, but I want to access specific fields
If you're using CF 4.5, you can reference the URL structure, which contains
each name-value pair within the query string. You might need to read up on
Structures a little bit. Here's an example, which will loop over the URL
structure and output the name and value for each URL parameter:
<CFLOOP COLLECTION="#URL#" ITEM="ThisURLParam">
<CFOUTPUT>
#ThisURLParam#: #URL[ThisURLParam]#<br>
</CFOUTPUT>
</CFLOOP>
If you're using an older version, you can loop over the query string as if
it were a list; the delimiter for the list is the ampersand (&).
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.