<script language="javascript">
function setvar(this) {
document.location.href = thispage.cfm?translate=yes
}
</script>

<cfparam name="URL.translate" default="NO">

<cfif URL.translate>
<!--- do translation --->

</cfif>



                                                                                       
                            
                    "Ian                                                               
                            
                    Westbrook"           To:     "cfug dev list" <[EMAIL PROTECTED]>   
                  
                    <[EMAIL PROTECTED]        cc:                                      
                                 
                    eam.net>             Subject:     [ cf-dev ] js and cf             
                            
                                                                                       
                            
                    07/07/2003                                                         
                            
                    14:15                                                              
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    dev                                                                
                            
                                                                                       
                            
                                                                                       
                            



Hi
I'm using some code I ripped from Google to translate my site into 5
European languages. If someone clicks a form button to translate, I want to
set a session var in CF so that I can then test for it to see whether to
output stuff I don't want foreign-language users to get (registration,
quote of the day etc)

what I want is this:


// form button
<input type=submit value="Translate" onClick="setvar()">

//script

<script language="javascript">
function setvar(this) {
document.write ("
<CFLOCK
SCOPE=\"session\"
TIMEOUT=\"30\"
TYPE=\"Exclusive\">
<cfset session.translate = \"yes\">
</CFLOCK>
}
</script>

I haven't tried that cause I don't think it's going to work, but it
demonstrates what I need.

anyone any ideas?

TIA

Ian W

Ian Westbrook,
FutureDream Media Limited,
(W): www.futuredream.net
(E): [EMAIL PROTECTED]
(T): +44 (0) 1303 258 985
(M): 07939 510 812

This message may contain information which is legally privileged and/or
confidential. If you are not the intended recipient, you are hereby
notified that any unauthorised disclosure, copying, distribution or use of
this information is strictly prohibited. Such notification notwithstanding
any comments, opinions, information or conclusions expressed in this
message are those of the originator, not of FutureDream Media Ltd, unless
otherwise explicitly and independently indicated by an authorised
representative of FutureDream Media Ltd.





-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to