Based on your example, I see no reason why you need to use WDDX at all. If you're just trying to pass a simple JS variable to ColdFusion all you need to do is create a hidden form field and then set the value of that field via JavaScript. When the form is submitted the JS value will be passed to CF.
Remember that JS runs on the client, so you're going to need a way to pass the value back to the server (where CF is running). A form post is a simple way of doing this. Another way would be via a URL variable using a JavaScript redirect. Let me know if the above explanation makes sense, or if you need more detail. Bob ----- Original Message ----- From: "Bill Sourour" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 03, 2002 6:34 AM Subject: [CFTALKTor] JS 2 CFML > Hey all, > Going a little bonkers here... I am trying to pass a JavaScript > variable to ColdFusion. As I understand it, I should be able to convert the > JavaScript to WDDX and then use CFWDDX to convert the WDDX to ColdFusion. > But I have no clue of the correct syntax to achieve this. Anybody have some > sample code kicking around? The part that I'm especially confused about is > getting the JS variable into WDDX form. > > right now It looks like: > > <SCRIPT> > var left = eval(screen.availWidth / 2 - 395) > </SCRIPT> > <SCRIPT> > this.serializeValue(left); > </SCRIPT> > <CFWDDX action="WDDX2CFML" input="left" output="theleft" validate="yes"> > > Which I know is completely off. > > Any help would be appreciated. > > - > You are subscribed to the CFUGToronto CFTALK ListSRV. > This message has been posted by: "Bill Sourour" <[EMAIL PROTECTED]> > To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ > Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ > This System has been donated by Infopreneur, Inc. > (http://www.infopreneur.net) > - You are subscribed to the CFUGToronto CFTALK ListSRV. This message has been posted by: "Bob Silverberg" <[EMAIL PROTECTED]> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ This System has been donated by Infopreneur, Inc. (http://www.infopreneur.net)
