Thanks Bob,
       The explanation makes sense, and as a matter of fact that's what I've
always done in the past whenever I needed to pass JS back to the CF server,
unfortunately on this particular app, for reasons which would take WAY too
long to explain I can't use that method.

        I ended up finding a workaround to my particular problem, but it
would still be cool to know if anyone has ever been able to successful pass
JS to the CFSERVER through WDDX.

        I guess you wouldn't really be able to get around some kind of
submit back to CF on the server side. Anyway, thanks for the help Bob. :-)

--
Bill.

----- Original Message -----
From: "Bob Silverberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 02, 2002 3:08 PM
Subject: Re: [CFTALKTor] JS 2 CFML


> 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)
>

-
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)

Reply via email to