The CFSCRIPT approach almost works -
Script output is
<CFSCRIPT>
        dir = #walkdir#;
        WriteOutput(dir);
</CFSCRIPT>
<INPUT TYPE="hidden"
                  NAME="dirname"
                  VALUE="#dir#">
This writes the current value to the current screen - good
This does not pass the value to the input field as #dir# - bad
Therefore no passing to the next page.  The problem is probably due to
CFSCRIPT being executed on the server just like CF vs JS on the client.

Other suggestions?

RIchard

-----Original Message-----
From: Mike Connolly [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 15, 2000 8:17 AM
To: '[EMAIL PROTECTED]'
Subject: RE: JS to CF variable


Try using <CFSCRIPT> instead of <SCRIPT>

This will allow you to access CF variables in your script.

> -----Original Message-----
> From: Richard Kern [SMTP:[EMAIL PROTECTED]]
> Sent: 15 September 2000 15:11
> To:   [EMAIL PROTECTED]
> Subject:      JS to CF variable
> 
> 
> I have a  #url.path# variable that is dynamically populated.  At the end
> of
> the users selection I need to pass that value to a CFFILE tag as a
> destination directory.  Given that this occurs on the page before being
> passed to the server, JS makes sense here to collect it on the first page
> and convert it to a form variable.
> 
> I have tried the following to no avail and would appreciate some insight
> as
> to how to do it.  
> 
> Thanks
> 
> Richard Kern
> 
> ----------
> <SCRIPT LANGUAGE="JavaScript"
>         TYPE="text/javascript">
> <!--
>        function set_path() 
>         {document.forms[0].dir.value = "#url.path#"}
> 
> //-->         
> </SCRIPT>
>       
> called at 
>       <INPUT TYPE="submit"
>         NAME="Submit"
>         VALUE="Press to upload"
>         onsubmit="set_path();">
> 
> 2nd page - this produces no output
> 
> <CFOUTPUT>
>       #FORM.DIR#
>       ------
> 
> </CFOUTPUT>
> 
>       
> --------------------------------------------------------------------------
> --
> --
> Archives: http://www.mail-archive.com/[email protected]/
> 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.
> 
> 
> --------------------------------------------------------------------------
> ----
> Archives: http://www.mail-archive.com/[email protected]/
> 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.


-----------------------------------------------
Any opinions expressed in this message are those of the individual and not
necessarily the company.  This message and any files transmitted with it are
confidential and solely for the use of the intended recipient.  If you are
not the intended recipient or the person responsible for delivering to the
intended recipient, be advised that you have received this message in error
and that any use is strictly prohibited.

Sapphire Technologies Ltd
http://www.sapphire.net
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.

Reply via email to