I know this goes beyond conventional teaching
But I have found that you need the JavaScript references objects in the
same document to be place after the object

I have attached a Taf and tcf to illustrate this.


Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Latest downloads & List Archives @ http://www.witango.ws


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Fogelson, Steve
Sent: Wednesday, November 27, 2002 8:53 AM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: Javascript - OT

I'm using the SelectField method of Common.tcf from Storefront. I
believe I
am having trouble with the javascript in this method.

I changed it to the following for debugging purposes

<H3>Initialfield: <@VAR method$InitialField></H3><BR>
<SCRIPT>
<!--
        // Set focus on the first field
        var objField;

        objField = document.forms[0].elements["<@VAR
method$InitialField>"];
        if (objField) objField.focus();
        document.write("objField: ");
        document.write(objField);
        document.write("<BR>Forms: ");
        document.write(document.forms[0].elements);
// -->
</SCRIPT>

When I use it in a taf, objField displays: "undefined"

Initialfield: U_Userid

objField: undefined
Forms: [object] 

For testing purposes, I used the identical lookup.taf file from
StoreFront.
I think the only difference is the field name. Storefront uses
"ShopperEmail", I used "U_Userid". Would the "_" in the table name cause
any
problems or does anyone have any other ideas why it would display
"undefined"?

Steve Fogelson
Internet Commerce Solutions


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Attachment: TestFocus.taf
Description: Binary data

Attachment: inCommon.tcf
Description: Binary data

Reply via email to