Re: Witango-Talk: WiTango with SQL Server 2005 Database Mirroring

2009-04-20 Thread Anthony Humphreys
Rob, Robert,

This is also on my own To Do List... Therefore I, too, am quite interested
to hear how things work out for you on this.

The servers don't have to busy to see the effect that doing this has on
performance; I've done this, and it's awful! It adds an extra 0.1 to 1.5
seconds for every page, usually about 1/4 to 1/2 second per page. It really
makes the site become sluggish. Yuck!

Better to catch the specific error and to do a redirect (reload) when
caught, Perhaps by using Tango's error.htx (or else in all of the DB actions
-- best as an include file!)

Anthony -


On 4/21/09, Robert Shubert  wrote:
>
> Rob,
>
> I don't have any experience with what you are doing - but it's on my to-do
> list so I am interested in hearing about your problem (and hopefully
> solution)
> ...deleted... In my opinion, I would either let Witango throw its errors
> and close down
> the useless connections, sure you'll give a handful of people a poor
> experience, but it should ultimately work properly. Another idea would be
> to
> restart the Witango service as part of the fail-over
> activation/deactivation
> script. I'm not sure how sophisticated your fail-over mechanism is, but
> many
> have scripting environments where you can easily stop and start NT
> services.
>
> Hope that helps.
>
> Robert
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: Stripping Tags

2009-04-23 Thread Anthony Humphreys
Steve,
Could you do this easily with JavaScript's regular expressions? If so,
sandwich the string.replace() between a server.getVariable() and a
server.setVariable inside a @SCRIPT
The nice thing is that JavaScript's replace is really fast, faster than
using @REPLACE

On Thu, Apr 23, 2009 at 10:40 AM, Fogelson, Steve
wrote:

>  I would like to strip tags when displaying certain variables. For example
> variables that will be displayed in “alt” tags in html “img” tags.
>
>
>
> Generally it will probably be html tags. I would like to do it in the most
> efficient manner remembering that there may be multiple different tags in
> the variable.
>
>
>
> I could use multiple <@replace> for different tags, but then you have tags
> that that are variable in length.
>
>
>
> I could use a <@for> loop in conjunction with <@locate str=”<”> and
> <@locate str=”>”> and delete inclusive. Not sure if this is the most
> efficient.
>
>
>
> Looking for ideas.
>
>
>
> Thanks,
>
>
>
> Steve Fogelson
>
> Internet Commerce Solutions
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: Bitwise Operators and Enumeration

2009-07-03 Thread Anthony Humphreys
JavaScript does this kind of thing with ease, and it's easy enough to
incorporate ServerSide JavaScript in Witango.
Use the Bit operators:
Bit AND = &
Bit OR = |
Bit XOR = ^
vs
Logical AND = &&
Logical OR = ||
Logical NOT = !



On 7/3/09, John Hotaling  wrote:
>
>  Hello:
>
> Is anybody using Witango for something like the following?
>
> http://www.johnsample.com/articles/BitwiseEnums.aspx
>
> In general, I want to test for the following in Witango using the above
> referenced bitwise operator logic:
>
> <@ASSIGN NAME="PermissionForTaskA" value="1">
>
> <@ASSIGN NAME="ThisClientsPermissions" value="33">
>
> Does this client have permission to do Task A?  In this case, Yes is the
> answer.
>
>
>
> <@ASSIGN NAME="PermissionForTaskB" value="2">
>
> <@ASSIGN NAME="ThisClientsPermissions" value="33">
>
> Does this client have permission to do Task B?  In this case, No is the
> answer.
>
>
>
> For example, if you had an integer column called ThisClientsPermissionswith a 
> value of 33, you could use the following statement to return the row
> if it has  PermissionForTaskA (1)
>
> select row from table where (PermissionForTaskA & 1 > 0)
>
> Can the calc metatag assist with this type of logic?
>
> Thank you in advance for any assistance/insight.
>
> John Hotaling
>
> AuctionAnything.com, Inc.
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: And We're Back To Silence

2009-09-24 Thread Anthony Humphreys
Shhh! Genius at work...

On Thu, Sep 24, 2009 at 3:40 PM, Steve Smith  wrote:

> Interesting...
> Steve Smith
>
> Oakbridge Information Solutions
> Oakville Office: (416) 628-0793
> Cambridge Office:   (519) 489-0142
> Email:  ssm...@oakbridge.ca
> Web: www.oakbridge.ca
>
> Certified DayLite  Master 
> PartnerFileMaker
> Solutions Alliance  Member
> MoneyWorks  Consultant
> LightSpeed  Authorized Reseller
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: autocomplete speed comparison

2009-10-06 Thread Anthony Humphreys
If you were to turn on Wiango's Debug, the number as the far left show the
time taken. Where is the longest delay, and work to reduce that.

If you don't have caching turned on, the act of having to load the taf file
will add a delay and increase the time.

Remove unnecessary actions before the one which returns your results. Large
TAF files with lots of IF/ELSEIF actions will become slower for the latter
actions.

Witango puts the DB connection into a "pool" for re-use. The first use of a
database connection is slower than subsequent uses of the same datasource.
How long Witango keeps datasource connections open can be controlled.
Witango does cache the results of commonly used queries, every query is done
fresh from the DBMS.

Witango has been accused of being slow when using its looping featues, @FOR
and @ROWS, especially on on large result sets (arrays). Is there any way to
re-write the output to avoid using the @ROWS, ie using the array parameters
of @VAR, ie APREFIX, ASUFFIX, RPREFIX, RSUFFIX, CPREFIX, CSUFFIX
see http://humphreys.org/reference/Witango4.5_Help/meta/metata7a.htm




On 10/6/09, Ted Wolfley  wrote:
>
>  Hi,
>
>
>
> We created a simple ajax autocomplete retrieving name and company from a
> sql server 2005 table on another server.  We compared 2 different options.
>
>
>
> Both servers are Windows 2003 32-bit
>
>
>
> Using Witango 5.5, the query request took 528ms.
>
> Using ASP.Net, the query request took 34 ms
>
>
>
> The sql statement is the same for both queries
>
>
>
> Wondering if someone could give an explanation why there is so much
> difference in speed and is there a way to speed up the Witango query.
>
>
>
> Ted Wolfley
> Lead Internet and Database Programmer
> The Ogden Group of Rochester
> phone: (585) 321 1060 x23
> fax: (585) 321 0043
> t...@ogdengroup.com
>
> www.ogdengroup.com
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: autocomplete speed comparison

2009-10-06 Thread Anthony Humphreys
Should have read:
Witango does NOT cache the results of commonly used queries, every query is
done fresh from the DBMS.


On 10/6/09, Anthony Humphreys  wrote:
>
> If you were to turn on Wiango's Debug, the number as the far left show the
> time taken. Where is the longest delay, and work to reduce that.
>
> If you don't have caching turned on, the act of having to load the taf file
> will add a delay and increase the time.
>
> Remove unnecessary actions before the one which returns your results. Large
> TAF files with lots of IF/ELSEIF actions will become slower for the latter
> actions.
>
> Witango puts the DB connection into a "pool" for re-use. The first use of a
> database connection is slower than subsequent uses of the same datasource.
> How long Witango keeps datasource connections open can be controlled.
> Witango does cache the results of commonly used queries, every query is done
> fresh from the DBMS.
>
> Witango has been accused of being slow when using its looping featues, @FOR
> and @ROWS, especially on on large result sets (arrays). Is there any way to
> re-write the output to avoid using the @ROWS, ie using the array parameters
> of @VAR, ie APREFIX, ASUFFIX, RPREFIX, RSUFFIX, CPREFIX, CSUFFIX
> see http://humphreys.org/reference/Witango4.5_Help/meta/metata7a.htm
>
>
>
>
> On 10/6/09, Ted Wolfley  wrote:
>>
>>  Hi,
>>
>>
>>
>> We created a simple ajax autocomplete retrieving name and company from a
>> sql server 2005 table on another server.  We compared 2 different options.
>>
>>
>>
>> Both servers are Windows 2003 32-bit
>>
>>
>>
>> Using Witango 5.5, the query request took 528ms.
>>
>> Using ASP.Net, the query request took 34 ms
>>
>>
>>
>> The sql statement is the same for both queries
>>
>>
>>
>> Wondering if someone could give an explanation why there is so much
>> difference in speed and is there a way to speed up the Witango query.
>>
>>
>>
>> Ted Wolfley
>> Lead Internet and Database Programmer
>> The Ogden Group of Rochester
>> phone: (585) 321 1060 x23
>> fax: (585) 321 0043
>> t...@ogdengroup.com
>>
>> www.ogdengroup.com
>>
>>
>>
>> 
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: autocomplete speed comparison

2009-10-06 Thread Anthony Humphreys
For one search action, anything less 100ms and I generally leave it be.
But at 500ms or more I'm pulling (what little is left of) my hair out trying
to fix the issue, as it is a real drain on performance, and has a negative
impact on the user's (and client's) perception of the application I've
built.

Very long lists, very large results sets, and aggregated reports may take
more than 500ms. Everything else, I try to get below that 100ms threshold. I
generally find that when the SQL/DBMS are optimised, the rest just falls
into place.

If the same SQL is running against the same DBMS but takes 500+ms in Witango
and is almost free in .NET, then I would suspect that .NET is doing results
caching.



On Tue, Oct 6, 2009 at 10:54 AM, Ted Wolfley  wrote:

>  Witango speed stayed about the same on repeat queries and the
> datsourcelife is set at the default.
>
> The ajax taf is tiny and using the Direct_DBMS for the query via a tcf.
> The database connection is opened at login to the site.
>
>
>
> I guess we will go with the .NET version until we see what Witango 6 has to
> offer.
>
>
>
> Thanks
>
>
>
> Ted
>
>
>  --
>
> *From:* Robert Garcia [mailto:wita...@bighead.net]
> *Sent:* Tuesday, October 06, 2009 10:12 AM
>
> *To:* witango-talk@witango.com
> *Subject:* Re: Witango-Talk: autocomplete speed comparison
>
>
>
> ODBC and persistent connections would be my guess, as long as ALL OTHER
> variables are equal. Repeat the query a few times, and see if it is faster.
> Witango is most likely using ODBC connector and .NET is using a more native,
> optimized connection. Witango will always take longer on its FIRST query to
> a connection, due to the overhead of opening a connection from scratch.
> Witango will then hold that connection in memory and try to reuse it, saving
> time on subsequent queries. This seems efficient, but it actually ends up
> wasting memory on both the witango side and especially the db server side.
>
>
>
> Check the documentation on the datasourcelife configuration variable.
>
>
>
> --
>
>
>
> Robert Garcia
>
> President - BigHead Technology
>
> VP Application Development - eventpix.com
>
> 13653 West Park Dr
>
> Magalia, Ca 95954
>
> ph: 530.645.4040 x222 fax: 530.645.4040
>
> rgar...@bighead.net - rgar...@eventpix.com
>
> http://bighead.net/ - http://eventpix.com/
>
>
>
> On Oct 6, 2009, at 6:44 AM, Ted Wolfley wrote:
>
>
>
>  Hi,
>
>
>
> We created a simple ajax autocomplete retrieving name and company from a
> sql server 2005 table on another server.  We compared 2 different options.
>
>
>
> Both servers are Windows 2003 32-bit
>
>
>
> Using Witango 5.5, the query request took 528ms.
>
> Using ASP.Net, the query request took 34 ms
>
>
>
> The sql statement is the same for both queries
>
>
>
> Wondering if someone could give an explanation why there is so much
> difference in speed and is there a way to speed up the Witango query.
>
>
>
> Ted Wolfley
> Lead Internet and Database Programmer
> The Ogden Group of Rochester
> phone: (585) 321 1060 x23
> fax: (585) 321 0043
> t...@ogdengroup.com
>
> www.ogdengroup.com
>
>
>
> 
>
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Witango-Talk: [off] JS pulldown/select-option question

2009-11-10 Thread Anthony Humphreys
Hi all,

We had a problem where people were putting in inaccurate information for the
"city."
We solved that problem by using some javascript and limiting the choice of
cities by using a pull-down.  The list of cities is limited by the choice of
province.

This introduced a new problem, the page took a very long time to load as the
sript and array of cities was being loaded by the browser.
We solved this by moving the JS script and the JS city array (city list)
into an external JS file which is loaded after the form is pushed to the
browser. Now the form sppears to load very quickly, as the script/array
loads after the browser has already rendered the form.

However, this introduces a new problem: the form can changed by the
user before all the scripts/arrays have loaded.

I seem to have a few options avaialable to me to solve this, but I was
wondering how you have solved this dilemma.

Option One: Disable the province/city pulldowns until the all the
scripts/arrays load.
Option two: Only populate the province pulldown with the current province;
load the rest of the provinces with the whole province list only when all
the scripts/arrays are loaded
Option three: Save the initial state of the pulldowns; once all of the
script/arrays are loaded compare the intial state against the current state
of the form and make the appropriate updates.
Other options: Other strategies you have used but that I've not listed.

Thanks!

Anthony -


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: [off] JS pulldown/select-option question

2009-11-10 Thread Anthony Humphreys
Interesting idea, and one I'll likely use elsewhere.

We already test the postal code against a regex so that it at least has to
be a valid postal code... I'll think that I'll propose this idea to the
purse-strings holder (ie our client)

In our current case, any address information they provide is strictly
optional. However, we do want it to be reasonably accurate (therefore the
pulldown of cities).
...But using only the postal code to populate the city/province is a good
one! It means that the web users have fewer places to interact, less places
to make errors, we ask them for fewer peices of information... hmmm...



On 11/10/09, Ted Wolfley  wrote:
>
>  Hi,
>
>
>
> You could use ajax and load the city field after they enter the zip code,
> if you have the zip code for each city.
>
>
>
> Ted
>
>
>
>
>
>
>  --
>
> *From:* Anthony Humphreys [mailto:anth...@humphreys.org]
> *Sent:* Tuesday, November 10, 2009 11:20 AM
> *To:* witango-talk@witango.com
> *Subject:* Witango-Talk: [off] JS pulldown/select-option question
>
>
>
>
>
> 
>
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>  
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: [off] JS pulldown/select-option question

2009-11-10 Thread Anthony Humphreys
Brian, I mean you no disrepect, but I'm not sure I like this idea for a few
reasons. You'll have to do a much better job of convincing me.

Best practices suggest that AJAX should be cacheable; however dynamic
lookups from the server aren't cacheable. We are looking to move towards
AJAX at some point, but we have not yet decided on what, if any, framework
will work best for us. Using script.aculo.us & Prototype.js for this one
feature seems very much overkill.

About 10% of of our web users are still on dial-up. Adding another 136kb
download for the Prototype.js file and still more kb for the
script.aculo.usfiles will further slow things down for these users.
The idea is to make
things (seem) faster, not make our pages load even slower.

I'd be more tempted to break the list into separate lists for each province
and use AJAX to load the file that has only the list of cities in that
province. But even for this approach, the script(s) may laod after the form
is rendered, so a strategy must be taken to handle changes to the form
before the script(s) have a chance to load, which is what I was aksing
about.

Lastly, our server loads are getting higher on our machine as we get more
participation. Our emphasis on speed this year has actualy encouraged more
people to participate; therefore more people are using our server.  We've
already added load balancing Witango servers to handle the increases in
load, and we are monitoring continuing to monitor the situation closely.
Asking the Witango servers to also handle AJAX queries would only add to the
load that the Witango/DBMS server already has, and _could_ erode the many
gains we've already made. I'd prefer to offload the duty off the Witango
server as much as possible unless there's very high usuability gains. The
autocompleter seems more like a nice to have than a must have as the users
can already type the first few characters of the city's name to find the
city when the focus is on the city pulldown. Standard form elements work
better, especially in microbrowsers and browsers without JavaScript. It not
clear how this would work in a non-JavaScript browser.



On 11/10/09, Brian Humes  wrote:
>
> Hi Anthony,
>
> Another option would be to use an autocompleter. Make the city field a text
> input, but as the user starts typing a little list of possible entries
> appears below the text input. The user can either mouse click on one or use
> arrow keys to select one. The list of possible entries is pulled dynamically
> using ajax.
>
> I've used this one from scriptaculous. Works great. All of the instructions
> are here:
>
> http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter
>
> Hope this helps.
>
>
> Brian Humes
> Director, Interactive
> JohnsonRauhoff
> 269-428-9257 (direct)
> 269-428-3377 (main)
> 269-428-3312 (fax)
> www.johnson-rauhoff.com
> bhu...@johnson-rauhoff.com
>
>
>
>
>
> On Nov 10, 2009, at 11:20 AM, Anthony Humphreys wrote:
>
> Hi all,
>>
>> We had a problem where people were putting in inaccurate information for
>> the "city."
>> We solved that problem by using some javascript and limiting the choice of
>> cities by using a pull-down.  The list of cities is limited by the choice of
>> province.
>>
>> This introduced a new problem, the page took a very long time to load as
>> the sript and array of cities was being loaded by the browser.
>> We solved this by moving the JS script and the JS city array (city list)
>> into an external JS file which is loaded after the form is pushed to the
>> browser. Now the form sppears to load very quickly, as the script/array
>> loads after the browser has already rendered the form.
>>
>> However, this introduces a new problem: the form can changed by the user
>> before all the scripts/arrays have loaded.
>>
>> I seem to have a few options avaialable to me to solve this, but I was
>> wondering how you have solved this dilemma.
>>
>> Option One: Disable the province/city pulldowns until the all the
>> scripts/arrays load.
>> Option two: Only populate the province pulldown with the current province;
>> load the rest of the provinces with the whole province list only when all
>> the scripts/arrays are loaded
>> Option three: Save the initial state of the pulldowns; once all of the
>> script/arrays are loaded compare the intial state against the current state
>> of the form and make the appropriate updates.
>> Other options: Other strategies you have used but that I've not listed.
>>
>> Thanks!
>>
>> Anthony -
>>
>>
>> 
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: [off] JS pulldown/select-option question

2009-11-11 Thread Anthony Humphreys
I have implemented a solution to this, and I thought it polite to provide an
update...

In order to work with Non-JS browsers, disabling the dropdowns until the JS
was loaded (Option one) was not a good enough solution. The same for Option
Two; the whole province list cannot be loaded after the page has rendered in
a non-JS browser; I have to load all of the provinces in the province
dropdown from the start.

In the cities dropdown in the form I load in the list of cities of the
selected province. I also save the province that page loaded with as a JS
variable.
After the page's form loads (and renders) the page loads and attaches the
event handler for the pull-down of the province, which will re-populate the
city list with the cities in the newly chosen province.
After the cityArray and the event handler script is loaded and attached to
the province pulldown, I check to see if the province in the pull-down does
not equal to the initial page state in the JS variable. If they are not
equal then I invoke the province pulldown's event handler, which loads in
the new city list for the new province chosen, which is defaulted to "select
a city."
If the page is saved before the event handler is loaded such that the city
does not exist in the chosen province, I discard the value of the city and
save only the chosen province. The client has chosen not to stop and throw
an error, but instead let the user "get on with things". I could have
stopped and reloaded the form, explained the error, and given the user a
chance to choose a correct city in their province.

I was able to use a program called "sloppy" to simulate a slow speed
connection, and I was able to test this behaviour, and I was able to test
various scenarios of a partially loaded page.

Oh, and I made one other change: The list of cities had been pulled in as
pre-loaded options: ie: ...citiesArray['ON'][15] = new
Option('Toronto','Toronto',false,false);...
I now only pull in an array of cities:citiesArray['ON'] =
['Burlington',Bradford','Brantford','Toronto',...];
This loads faster (80% smaller file!!), but has slower JS performance as I
have to create the Options objects in the loop based on the cities in
the citiesArray; a trade off that we're willing to make.

And, this strategy will still work when the page is changed to fetch the
city list using AJAX. ;-)


On 11/10/09, Anthony Humphreys  wrote:
>
> Hi all,
>
> We had a problem where people were putting in inaccurate information for
> the "city."
> We solved that problem by using some javascript and limiting the choice of
> cities by using a pull-down.  The list of cities is limited by the choice of
> province.
>
> This introduced a new problem, the page took a very long time to load as
> the sript and array of cities was being loaded by the browser.
> We solved this by moving the JS script and the JS city array (city list)
> into an external JS file which is loaded after the form is pushed to the
> browser. Now the form sppears to load very quickly, as the script/array
> loads after the browser has already rendered the form.
>
> However, this introduces a new problem: the form can changed by the
> user before all the scripts/arrays have loaded.
>
> I seem to have a few options avaialable to me to solve this, but I was
> wondering how you have solved this dilemma.
>
> Option One: Disable the province/city pulldowns until the all the
> scripts/arrays load.
> Option two: Only populate the province pulldown with the current province;
> load the rest of the provinces with the whole province list only when all
> the scripts/arrays are loaded
> Option three: Save the initial state of the pulldowns; once all of the
> script/arrays are loaded compare the intial state against the current state
> of the form and make the appropriate updates.
> Other options: Other strategies you have used but that I've not listed.
>
> Thanks!
>
> Anthony -
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: the case of the disappearing cookie....

2009-11-15 Thread Anthony Humphreys
I know that any cookies won't get set when you have any actions "push"ed
before the assignement. This is because the cookie is set in the HTTP header
which is sent when the first bit of HTML is sent by Witango to the browser.
You can set the cookie(s) using JavaScript at anytime you're also sending
back HTML.



On 11/15/09, Roland Dumas  wrote:
>
>
> I'm going batty. A simple enough thing: setting a cookie. Whether I do it
> with an assign action or an <@assign> tag, the following occurs
>
> a taf with JUST the assignment works. The cookie is set. I can set it,
> re-set it, change the expiry. It behaves as expected in a single step taf.
>
> Put that action in a longer taf (dragging the action from the test taf to
> the one I'm working on), and the debug shows the cookie assignment. I can
> put all kinds of displays in the taf to show that it is alive through the
> last return. The cookie isn't set. It behaves like a request scope. As soon
> as the taf completes, it's vanished. It never appears in the browser.
>
> So, I put a branch and return action from the taf to the one-action taf
> that had successfully set the cookie. No go. It isn't persistent. Another
> request scope cookie.
>
> There aren't any <@purge> tags that affect cookie scope and there is no
> other cookie assignment in the application that might be conflicting. What
> might cause a cookie to expire as soon as the taf completes?
>
> just found one more clue: If an assignment is made within IF/ELSEIF/THEN
> logic, it expires at the completion of the taf. If it is made outside of any
> conditional actions, it sets. Anyone seen this before?
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: the case of the disappearing cookie....

2009-11-15 Thread Anthony Humphreys
Cookies are all about the HTTP header, and any TAF files which touch the
HTTP hearder, including setting cookies, cannot use any actions which are
marked "push."
Witango's "Push" is about equivalent to the flush buffer commands in other
languages; it empty's the accumulated "Results" and "pushes" it to the
browser, ergo the monker: Push.

Once at least some HTML has been sent, so has the whiole HTTP header at it
always precedes any HTML. This means that you can do nothing else whch can
affect the header, including setting cookies after using a "push."



On 11/15/09, Roland Dumas  wrote:
>
> AHA!
>
>
> I'd put a push on an action when testing it. Thank you thank you.
>
>
>  On Nov 15, 2009, at 4:13 PM, Anthony Humphreys wrote:
>
>  I know that any cookies won't get set when you have any actions "push"ed
> before the assignement. This is because the cookie is set in the HTTP header
> which is sent when the first bit of HTML is sent by Witango to the browser.
> You can set the cookie(s) using JavaScript at anytime you're also sending
> back HTML.
>
>
>
> On 11/15/09, Roland Dumas  wrote:
>>
>>
>> I'm going batty. A simple enough thing: setting a cookie. Whether I do it
>> with an assign action or an <@assign> tag, the following occurs
>>
>> a taf with JUST the assignment works. The cookie is set. I can set it,
>> re-set it, change the expiry. It behaves as expected in a single step taf.
>>
>> Put that action in a longer taf (dragging the action from the test taf to
>> the one I'm working on), and the debug shows the cookie assignment. I can
>> put all kinds of displays in the taf to show that it is alive through the
>> last return. The cookie isn't set. It behaves like a request scope. As soon
>> as the taf completes, it's vanished. It never appears in the browser.
>>
>> So, I put a branch and return action from the taf to the one-action taf
>> that had successfully set the cookie. No go. It isn't persistent. Another
>> request scope cookie.
>>
>> There aren't any <@purge> tags that affect cookie scope and there is no
>> other cookie assignment in the application that might be conflicting. What
>> might cause a cookie to expire as soon as the taf completes?
>>
>> just found one more clue: If an assignment is made within IF/ELSEIF/THEN
>> logic, it expires at the completion of the taf. If it is made outside of any
>> conditional actions, it sets. Anyone seen this before?
>> 
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>
>  
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: the case of the disappearing cookie....

2009-11-16 Thread Anthony Humphreys
Back in the day, when I was doing support for Everyware, this was a very
common problem - especially with the newbies. As Witango is being not being
used by as many newbies, it would explain why we don't see this issue as
often anymore. But we all have lapses (and it gets worse as we get older);
and we ain't born with knowledge, nor experience. I included the explanation
as a courtesy for the next person who faces a similar problem, should they
choose to search through the discussion list archive.

I'm glad this issue was so easily solved.


On 11/16/09, Roland Dumas  wrote:
>
> I was cognitively impaired in two ways. I didn't know the push interfered
> with cookie setting and I'd completely forgotten that I'd put a push on some
> actions when I was debugging. So I didn't see it and didn't know it was
> important. I'd spent too much time trying to come up with the conditions
> where the cookie set failed and came up with a very elaborate and very wrong
> hypothesis. Egg on face.
>
>
> Again, thank you.
>
>
>  On Nov 15, 2009, at 5:14 PM, Anthony Humphreys wrote:
>
>  Cookies are all about the HTTP header, and any TAF files which touch the
> HTTP hearder, including setting cookies, cannot use any actions which are
> marked "push."
> Witango's "Push" is about equivalent to the flush buffer commands in other
> languages; it empty's the accumulated "Results" and "pushes" it to the
> browser, ergo the monker: Push.
>
> Once at least some HTML has been sent, so has the whiole HTTP header at it
> always precedes any HTML. This means that you can do nothing else whch can
> affect the header, including setting cookies after using a "push."
>
>
>
> On 11/15/09, Roland Dumas  wrote:
>>
>> AHA!
>>
>>
>> I'd put a push on an action when testing it. Thank you thank you.
>>
>>
>>  On Nov 15, 2009, at 4:13 PM, Anthony Humphreys wrote:
>>
>>  I know that any cookies won't get set when you have any actions "push"ed
>> before the assignement. This is because the cookie is set in the HTTP header
>> which is sent when the first bit of HTML is sent by Witango to the browser.
>> You can set the cookie(s) using JavaScript at anytime you're also sending
>> back HTML.
>>
>>
>>
>> On 11/15/09, Roland Dumas  wrote:
>>>
>>>
>>> I'm going batty. A simple enough thing: setting a cookie. Whether I do it
>>> with an assign action or an <@assign> tag, the following occurs
>>>
>>> a taf with JUST the assignment works. The cookie is set. I can set it,
>>> re-set it, change the expiry. It behaves as expected in a single step taf.
>>>
>>> Put that action in a longer taf (dragging the action from the test taf to
>>> the one I'm working on), and the debug shows the cookie assignment. I can
>>> put all kinds of displays in the taf to show that it is alive through the
>>> last return. The cookie isn't set. It behaves like a request scope. As soon
>>> as the taf completes, it's vanished. It never appears in the browser.
>>>
>>> So, I put a branch and return action from the taf to the one-action taf
>>> that had successfully set the cookie. No go. It isn't persistent. Another
>>> request scope cookie.
>>>
>>> There aren't any <@purge> tags that affect cookie scope and there is no
>>> other cookie assignment in the application that might be conflicting. What
>>> might cause a cookie to expire as soon as the taf completes?
>>>
>>> just found one more clue: If an assignment is made within IF/ELSEIF/THEN
>>> logic, it expires at the completion of the taf. If it is made outside of any
>>> conditional actions, it sets. Anyone seen this before?
>>> 
>>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>>
>>>
>> 
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>>
>>  
>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>>
>>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>
>  
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: encrypting into mysql

2009-11-24 Thread Anthony Humphreys
All of the hashes and encryption methods are found in Witango by using the
built-in Meta Tag @CIPHER.

<@CIPHER ACTION=action TYPE=type STR=string [KEY=key] [KEYTYPE] [ENCODING=
encoding]>

Hashes are perfect for a password; you don't need to store the password
itself, just the hash of the password. For additional security you would
append and/or prepend a
"salt"
or a "nonce " to the
password before hashing. When comparing, you'd need to be able to find the
salt and/or nonce again before hashing the raw password provided; Then
compare the two hashes.

Or, as a shortcut, you can remember that "salt" makes hash taste better. ;-)


SHA256 and SHA512 are the current standard, and would be best if you need
very high security. However, for most of our password applications, SHA (aka
SHA-1), or even MD5, is likely to be good enough for the level of security
our applications require. However, the larger/longer the hash, the more
computations required. And, because of the size/length of numbers used for
SHA224 and SAH512, the calculations are mostly done by software libraries;
these are not offloaded to the FPU, which means it takes much longer to
calculate.

There are also JavaScript implimentations available for _all_ of these hash
algorthms in case you wish to move of some of the processing client-side, or
else (perhaps in the future) port this to ASP, etc. It's also useful to have
these in JS because, at least on Windows, Witango uses the underlying OS to
help perform these claculations; however the OS may not impliment them all
(ie, SHA512 isn't available on Windows Server 2000) so having an
implimentation of these in JS provides a way for you to still be able to use
them within Witango.

When you are wanting to save Credit Card numbers, you will certainly want an
reversable encryption mechanism; and something which is reasonably strong.
Witango has four reasonable encryption methods to do this built-in:
TripleDES, Rijndael, Blowfish, MARS. The trick here is in how you
create/store the key. Never store the key with CC#. And be mindful of the
key lengths.

Others already mentioned that you'll want to play around with these before
you use them, and I am goin to re-ietrate that. Do a bit of reading, and
spend at least a day or two trying out the encrypting/decrypting and hashing
features before you decide which will best suit your needs. As you play you
start to see for yourself the tradeoffs in Speed Vs. Security which can help
you make your decision.

Anthony -



On 11/24/09, Roland Dumas  wrote:
>
> thank you. I'm ignorant about these things and need more explicit steps:
>
> how does one "hash" a string? There's no <@hash> tag in witango
>
> What if you really want the unhashed string back out? Say, a credit card
> number?
>
>
>
>
> On Nov 24, 2009, at 8:17 AM, Beverly Voth wrote:
>
> > On 11/24/09 11:08 AM, "Roland Dumas"  wrote in whole or
> in
> > part:
> >
> >>
> >> How does one insert a field into a database - mysql - so that it ends up
> >> encrypted?
> >> Needless to say, the field must be unencryptable in order to compare it
> to
> >> submissions, as in a password, or unencryptable for export, as in a cc
> number.
> >>
> >> How does this work?
> >
> > Typically, the data is hashed before INSERT. Then the data to "compare"
> is
> > also hashed and the two are compared. You don't need to "un-hash" the
> stored
> > information before comparison.
> >
> > 
> >
> > Beverly Voth
> >
> > 
> > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> >
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Witango-Talk: Merging snippets from different computers (and sharing snippets)

2009-11-27 Thread Anthony Humphreys
Does anyone have a tool for merging snippets from different computers (or
different profiles)

And on a related note, has anyone found a way to share snippets within a
workgroup or team?


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: crontab on macosx

2009-12-05 Thread Anthony Humphreys
There are two tricks.

Step one: Always Re-check the path, and the filename.
Step two: re-check the permissions on the file, and also on the path. The
user in which Witango runs as needs to be able to at least read the
file, and also have write access in the directory if it's going to write the
file.



On 12/5/09, Roland Dumas  wrote:
>
> Trying to get a taf fired off on a daily routine. I go to witango.ini and
> enter the path to the crontab file, the user file, not the system. Then, I
> try to set a crontab in the witango admin. It says no go. It doesn't have
> access to the crontab file.
>
> Any tricks here?
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: Help needed

2010-01-01 Thread Anthony Humphreys
This is where Client scripting could come in quite handy. AJAX is an
excellent solution, but not the only solution.

The other option is for the web client to load the entire (or perhaps, a
partial) location list and perform all (or with AJAX, some of) the
calculations client side. The form elements should be disabled until the
client script and values are loaded, thus preventing the user from using
them until they are ready in the browser. The values could be in a JS array,
and include the HTML snippets that the page needs to display about the
location.

This is not too different from pulling in a list of cities for a state or
province in one pull down to poulate another.

You may also find it convenient to create multiple smaller files, each one
carrying a subset of locations. You may want to do this to be able to both
load the answer file array faster, and to perform the calculations quicker.
The form would need to know which file to grab based on the range of the zip
code. How many files you'd need would be based on how large you data set is,
and what kind of response time you looking for. The files can be totally
dynamic (ie directly from the TAF file), or else  created once a day, once a
week, or else once a month; it really depends on how frequently you're
updating your location list.


On 1/1/10, Dan Stein  wrote:
>
> OK not user how if if I can do this one.
> My client wants to give code for a form out to his clients that will submit
> a zip code and distance to our site run through a taf file and return a
> list.
>
> It works on this page on our site
> http://www.needymeds.org/drugcard/index.shtml
> He would prefer they don't end up on our site after they submit the form
>
> I thought this might be done with framesets but I have not worked with them
> much.
>
> Not sure how they submit to our site and the results page ends up being
> frmaed in their site.
>
>
> ---
> Dan Stein MSN
> FileMaker 7 Certified Developer
> FileMaker 9 Certified Developer
> Digital Software Solutions
> 303 W. Chestnut St
> Souderton PA 18964
> Land: 215-799-0192
> Cell: 610-256-2843
> Fax 215-799-0192 ( Call 1st)
> FMP, WiTango,MSSQL, MySQL,PHP
> d...@dss-db.com
> www.dss-db.com
>
>
> "I destroy my enemies when I make them my friends."
>
> Abraham Lincoln
>
>
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: selecting records with same calendar month

2010-01-18 Thread Anthony Humphreys
Several ways:


   1. Get the DB to do the work by either
  1. Use the methods that the DB has to split date
  2. Or put the month and year in the DB as separate fields
   2. Use Witango to split the date and calculate the first and last days of
   the month, put both of the dates you calculate into your search and find the
   events between the two dates




On Mon, Jan 18, 2010 at 4:35 PM, Roland Dumas  wrote:

>
> Given: table with event records. One column is a date field.
>
> Question: how do I request a date and get back only records in the same
> calendar month as the requested date?
>
> Ex: I put in 05/06/2010 and get back a set of records that are all
> 05/XX/2010
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: WiTango Version

2010-01-27 Thread Anthony Humphreys
use <@PRODUCT>

I usually use these three together; rarely just one:
<@PRODUCT> <@VERSION> <@PLATFORM>


On Wed, Jan 27, 2010 at 2:02 PM, MC Tay  wrote:

> Hi:
>
> I have a pro version and a standard version of Witango installed on two
> separate machines. When I used the <@version> tag it didn't tell me which is
> the pro and which is the standard version. Is there a way to tell which is
> the pro version without looking at the configuration files?
>
> Thanks!
>
> MC
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: Detecting Javascript

2010-04-10 Thread Anthony Humphreys
Yes, there are several ways:

One is to do a redirect with both meta and JS


window.location.href = '<@APPFILE>?js=1';



Another is to embed a value within a form





document.local.js.value = '1';


Or embed a value within a link
click me

Browses with JS will send back the arg js=1;
and brwosers without JavaScript will send back js=0

These are but only three ways. I can imagine that there are others.
Use the one(s) that make the most sense to you and your app.




On Fri, Apr 9, 2010 at 9:45 PM, Dan Stein  wrote:

> Is there a way to use witango to see if Javascript is turned off in the
> users browser?
>
> I want to track how many people this is true for on a clients site.
>
> So I want to write a record in the DB every time we detect a user without
> JS enabled.
> --
> Dan Stein MSN CRNP
> FileMaker 7 Certified Developer
> FileMaker 9 Certified Developer
> Digital Software Solutions
> 303 W. Chestnut St
> Souderton PA 18964
> Land: 215-799-0192
> Cell: 610-256-2843
> Fax 215-799-0192 ( Call 1st)
> FMP, WiTango,MSSQL, MySQL,PHP
> d...@dss-db.com
> www.dss-db.com
>
>
>"There is a larger frame to the painting than the one that bounds our
> life's events."
>
>
>
>
>
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: date sent on mail actions is off

2010-04-10 Thread Anthony Humphreys
Witango shouldn't have its own Timezone rules; Witango should use the
server's local time and offset (from GMT).
However, Witango does need to reformat the time to specific SMTP format.
However, this reformat is the ONLY thing that Witango should be doing.

PDT stands for Pacific Daylight Time and has an offset of -0700.
PST stands for Pacific Standard Time and has an offset of -0800.

13:43:47 -0700 PDT is not equivalent to 2:43:47 PM PDT

It looks like Witango's daylight time handling code is wrong.






On Sat, Apr 10, 2010 at 12:29 PM, Roland Dumas  wrote:

> does the tango server had its own date rules?  I didn't see anything in
> witango.ini that set the time zone.
>
> On Apr 10, 2010, at 9:27 AM, Steve Smith wrote:
>
> > Could it have something to do with the fact that the Witango code was
> created before the new rules came into effect for Daylite Savings Time in
> 2007?
> >
> > Steve Smith
> >
> > Oakbridge Information Solutions
> > Oakville Office: (416) 628-0793
> > Cambridge Office:   (519) 489-0142
> > Email:  ssm...@oakbridge.ca
> > Web: www.oakbridge.ca
> >
> > Certified DayLite Master Partner
> > Certified DayLite Trainer
> > Billings Consultant
> > FileMaker Solutions Alliance Member
> > MoneyWorks Consultant
> > LightSpeed Authorized Reseller
> >
> > Sent from my iPad
> >
> > On 2010-04-10, at 12:19 PM, Roland Dumas  wrote:
> >
> >> Anyone have a clue why witango mail action gets timestamp off an hour?
> >>
> >> On Apr 9, 2010, at 2:11 PM, Roland Dumas wrote:
> >>
> >>> This is an example: Note the date field says 2:43 PM while the
> header correctly shows 1:43 PM.  This discrepancy happens only for witango
> mail action generated messages.
> >>>
> >>>
> >>> DateApril 9, 2010 2:43:47 PM PDT
> >>> To: Roland Dumas 
> >>> Received:   from Imagineworks.localhost 
> >>> (mail.imagineworks.com[64.151.109.164]) BY
> imagineworks.com ([64.151.109.164]) WITH ESMTP (4D WebSTAR V Mail
> (5.4.1)); Fri, 09 Apr 2010 13:43:47 -0700
> >>> Received:   from myunknowndomain (localhost [127.0.0.1]) by
> Imagineworks.localhost (Postfix) with SMTP id 0C52718023B for <
> radu...@servqual.com>; Fri,  9 Apr 2010 13:43:47 -0700 (PDT)
> >>>
> >>> On Apr 9, 2010, at 1:55 PM, Roland Dumas wrote:
> >>>
>  as of daylight saving time, the "sent" date on messages originating in
> witango mail actions is off by an hour. THey are an hour later than actual.
> 
>  The clock on the server is correct and has the right time zone
>  Messages going through the same mail server are all stamped correctly
>  The headers of the messages have the correct timestamps in them
> 
>  However, in mail clients that have "datetime sent" and 'datetime
> received'  show this disparity of an hour. The 'sent' value is ahead by an
> hour.  I cannot figure it out, other than it's related to a witango mail
> action.
> 
>  any clues?
> 
> 
> 
>  TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> 
> >>>
> 
> >>> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> >>>
> >> 
> >> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> >>
> > 
> > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> >
> 
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
>


TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Re: Witango-Talk: Server Free Edition

2010-10-16 Thread Anthony Humphreys
Excellent!!! Way Cool!

On Fri, Oct 15, 2010 at 11:21 AM, Robert Shubert wrote:

>  Explanation of the Free License:
>
>
>
> The Free server edition is limited in the number of user sessions (10) and
> threads (5) that it can process at any one given time. The Free server is
> officially a replacement for the Lite, Small Business, and Developers
> licenses. It is also intended to be used for pre-purchase trial and testing,
> to support validation, demoing, and burn-in on new systems and it can be
> used to support small hobbyist and personal sites.
>
>
>
> Robert
>
>
>
> *From:* Bill Downall [mailto:bdown...@downallconsulting.com]
> *Sent:* Friday, October 15, 2010 11:03 AM
> *To:* Witango-Talk@witango.com
> *Subject:* Witango-Talk: Server Free Edition
>
>
>
> Robert,
>
>
>
> What is the "Free" edition of the Witango Application Server License, shown
> on the Licensing page at witango.com? Is that an option for a development
> machine?
>
>
>
> Thanks.
>
>
>
> Bill
>
>
>  --
>
> To unsubscribe from this list, please send an email to
> lists...@witango.com with "unsubscribe witango-talk" in the body.
>
> --
> To unsubscribe from this list, please send an email to
> lists...@witango.com with "unsubscribe witango-talk" in the body.
>




To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.


Re: Witango-Talk: Print on javascript

2011-02-21 Thread Anthony Humphreys
For "security reasons", you cannot take control of my printer, nor change
it's settings (like force duplex, or turn off colour, or print 100 copies)

All you can do is offer the user a convenient link to print with
"window.print()" and let the user decide to press OK, or whatever.

I, for one, would not want to be "surprised" to find that some web page has
randomly taken over my printer. However, there are other products which do
allow more control (and offer usually better quality) for printing. However,
the quantity printed is generally on the "honour" system, and limited by
licence. PDF is one such mechanism, but there are others.

With CSS you do have some control over what does, and does not, get sent to
the printer (or screen). This allows you to, for instance, turn off menus
that aren't part of the main content that a user would want printed; or,as
another example, place a different style of banner ad on the printed page,
as opposed to the version of the same ad which appears on the screen -- this
printed version may even include a coupon or discount for a product or a
store. If available in the browser, CSS may even suggest where the page
break should go. But -- again -- it cannot change the settings of, or even
the number of copies on, the printer.

However, some browsers (and/or some browser plug-ins) do allow users to turn
on/off CSS -- or even use a user-supplied CSS. Developers (like myself)
often use tools like these to help them test their pages for certain things.

Anthony -



On Mon, Feb 21, 2011 at 4:41 PM, MC Tay  wrote:

> Hi:
>
> We are looking for an alternative print page javascript that would
> print once only and without displaying the print dialog. Any one has
> any script that can share please?
>
> We use window.print() currently.
>
> Thanks!
>
> MC
>
>
>
> 
>
> To unsubscribe from this list, please send an email to
> lists...@witango.com with "unsubscribe witango-talk" in the body.
>
>




To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.


Re: Witango-Talk: WiTango setVariable

2011-03-12 Thread Anthony Humphreys
try this:


server.setVariable('VTEST','12345', 'LOCAL');




On Sat, Mar 12, 2011 at 12:36 AM, MC Tay  wrote:

> Hi:
>
> I'm trying to use the setVariable to set a local variable but it kept
> saying "syntax error misson ;". Any idea where I did wrong?
>
> Here's the script I used in my app:
>
> 
> <@SERVERNAME>.setVariable('VTEST','12345', 'LOCAL');
> 
>
> Thanks!
>
> MC
>
>
>
> 
>
> To unsubscribe from this list, please send an email to
> lists...@witango.com with "unsubscribe witango-talk" in the body.
>
>




To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.


Re: Witango-Talk: Exact Numeric Character IFs

2011-08-15 Thread Anthony Humphreys
In a case like this, where @IF is not precise enough, I would bring that
into JavaScript and let it do a string comparison, ie something *like *this:

<@ASSIGN tmpVar <@ARG theValue>>
<@SCRIPT>
var strTheValue = server.GetVariable('tmpVar');
if (strTheValue == '00') {
server.assignVariable('tmpFlag','1');
} else {
server.assignVariable('tmpFlag','1');
}

<@IF @@tmpFlag>



On Mon, Aug 15, 2011 at 9:54 AM, WebDude  wrote:

> **
> This has never come up before and I know it's probably a stupid question,
> but I am trying to write an IF statement where I need to compare characters
> rather then numbers. I went through the manual and I am a bit confused. I
> thought that if you used single quotes, it would look at the expression as a
> character compare rather then a numeric compare. For example...
>
> <@IF EXPR="'0 = '0'" TRUE ="They really are not the same - one has a
> lot more zeros then the other" FALSE="They are the same">
>
> I have a client who has numeric codes that can start with multiple zeros
> and I need to be able to get a true or false depending on the actual
> characters rather then the numeric value.
>
> 0 = 0 would then be false.
>
> Probably a stupid fix, I just cannot see it. By the way, the <@IFEQUAL> tag
> evaluates the same way. I need a string comparison rather the numeric.
>
> Any help would be appreciated.
>
> Thanks!
>
> John M.
>
>
>
> **
>
>
> --
> To unsubscribe from this list, please send an email to
> lists...@witango.com with "unsubscribe witango-talk" in the body.




To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.


Re: Witango-Talk: Exact Numeric Character IFs

2011-08-15 Thread Anthony Humphreys
I meant:
...
} else {
server.assignVariable('tmpFlag','0');
}
...


On Mon, Aug 15, 2011 at 11:45 AM, Anthony Humphreys
wrote:

> In a case like this, where @IF is not precise enough, I would bring that
> into JavaScript and let it do a string comparison, ie something *like *
> this:
>
> <@ASSIGN tmpVar <@ARG theValue>>
> <@SCRIPT>
> var strTheValue = server.GetVariable('tmpVar');
> if (strTheValue == '00') {
> server.assignVariable('tmpFlag','1');
> } else {
> server.assignVariable('tmpFlag','1');
> }
> 
> <@IF @@tmpFlag>
>
>
>




To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.