Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JOSEL - Corrections to your scripts! 1

Status
Not open for further replies.

oldnewbie

Technical User
Dec 6, 2000
9,142
CA
Josel, you have to be consistent and check for syntax errors!
Remove the bold or correct the red in your script:

on (keypress &quot;<Tab>&quot;) {
if (Selection.getFocus() == &quot;_root._level0.companyname&quot;) {
Selection.setFocus(&quot;_level0.firstname&quot;);
} else if (Selection.getFocus() == &quot;_level0.firstname&quot;) {
Selection.setFocus(&quot;_level0.lastname&quot;);
} else if (Selection.getFocus() == &quot;_level0.lastname&quot;) {
Selection.setFocus(&quot;_level0.title&quot;);
} else if (Selection.getFocus() == &quot;_level0.title&quot;) {
Selection.setFocus(&quot;_level0.address1&quot;);
} else if (Selection.getFocus() == &quot;_level0.address1&quot;) {
Selection.setFocus(&quot;_level0.address2&quot;);
} else if (Selection.getFocus() == &quot;_level0.address2&quot;) {
Selection.setFocus(&quot;_level0.city&quot;);
} else if (Selection.getFocus() == &quot;_level0.city&quot;) {
Selection.setFocus(&quot;_level0.state&quot;);
} else if (Selection.getFocus() == &quot;_level0.state&quot;) {
Selection.setFocus(&quot;_root.__level0.zipcode&quot;);
} else if (Selection.getFocus() == &quot;_level0.zipcode&quot;) {
Selection.setFocus(&quot;_level0.dayphone&quot;);
} else if (Selection.getFocus() == &quot;_level0.dayphone&quot;) {
Selection.setFocus(&quot;_level0.nightphone&quot;);
} else if (Selection.getFocus() == &quot;_level0.nightphone&quot;) {
Selection.setFocus(&quot;_root.__level0.faxnumber&quot;);
} else if (Selection.getFocus() == &quot;_level0.faxnumber&quot;) {
Selection.setFocus(&quot;_level0.email&quot;);
} else if (Selection.getFocus() == &quot;_level0.email&quot;) {
Selection.setFocus(&quot;_level0.comments&quot;);
} else if (Selection.getFocus() == &quot;_level0.comments&quot;) {
Selection.setFocus(&quot;_level0.companyname&quot;);
}

You can also add this line on your &quot;quote&quot; label action frame, to already position the cursor on the first input field:

Selection.setFocus(&quot;_level0.companyname&quot;);

When that's done, everything will work fine!
How about another one!

Regards,
new.gif
 
Hey OLDNEWBIE, thanks for the extra tip on initial field focus.

I'm sorry about the lack of consistancy, as a beginner, I am approaching scripting with a grain of salt and some what fearfull ...

My form is now working pretty nicely thanks to you!


Regards;



Jose Lerebours

If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top