MC,
the only way you can communicate var value back to witango is
1. put the value in the get arg on the redirect
2. assigning the var value to like a hidden input
3. using ajax to make the call in the background.
There is no direct way to get JS vars (browser side) to work with witango vars
(server side)
On Nov 22, 2010, at 11:02 AM, MC Tay wrote:
> Robert:
>
> Here's the scenario. I have a "entry.taf" branching to "file01.taf"
> and "file02.taf" based on a javascript variable.
>
> In my entry.taf I have the following javascript currently:
>
> <script>
> function branchthis() {
> if (somejavascriptvar != "undefined") {
> location.href = 'http:// goto url of file01.taf';
> }
> else {
> location.href = 'http:// goto url of file02.taf';
> }
> }
> x = branchthis();
> </script>
>
> What I want is to detect the "somejavascriptvar'" variable within
> Witango and perform the branch calls instead of using the javascript.
>
> If I can assign the "somejavascriptvar'" to a Witango var within the
> branchthis() routine, it should work for me too.
>
> Thanks!
>
> MC
>
> At 11:10 AM 11/22/2010, you wrote:
>> MC,
>>
>> If you are referring to a JavaScript variable that is resident in
>> the user's browser, then no, Witango can't access the browser like that.
>>
>> That said, it is possible in certain circumstances, so please let us
>> know a little more about the situation.
>>
>> Robert
>>
>> -----Original Message-----
>> From: MC Tay [mailto:[email protected]]
>> Sent: Monday, November 22, 2010 12:48 PM
>> To: [email protected]
>> Subject: Witango-Talk: Detect javascript variables
>>
>> Hi:
>>
>> Is a way to check the value of javascript variable using the witango
>> IF action?
>>
>> Thanks!
>>
>> MC
>>
>>
>>
>> ----------------------------------------
>>
>> To unsubscribe from this list, please send an email to
>> [email protected] with "unsubscribe witango-talk" in the body.
>>
>>
>>
>> ----------------------------------------
>>
>> To unsubscribe from this list, please send an email to
>> [email protected] with "unsubscribe witango-talk" in the body.
>
>
>
> ----------------------------------------
>
> To unsubscribe from this list, please send an email to [email protected]
> with "unsubscribe witango-talk" in the body.
>
>
Ben Johansen
http://www.webspinr.com
[email protected]
Phone: 360-597-3372
Mobile: 360-600-7775
----------------------------------------
To unsubscribe from this list, please send an email to [email protected]
with "unsubscribe witango-talk" in the body.