[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

Radio buttons won't work on first click to execute funtion

I have two forms in acrobat. In the first form there are 3 radio buttons that have javascript actions behind them. They do a series of actions but the first one is a  highlight funtion to bold and change the font of the texbox next to the radio button that is checked.  It works fine with the form that has 3 radio buttons, but i have another form which has only 2 radio buttons. This form doesn't bold and change the font size on the first click, you are forced to click down on it multiple times before you get the result . Where i only have to click once on the form that has the 3 radio buttons. Here is the code:

FORM 2 with 2 buttons does not work
----- start

//-------------------------------------------------------------
//-----------------Do not edit the XML tags--------------------
//-------------------------------------------------------------

//<Document-Level>
//<ACRO_source>highlight</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:highlight ***********/
function highlight(f,selected)
{
// set some default style parameters
   
    f.richText = true; // this field does contain rich text
    f.multiline = true; // multiline

    var currentText = f.value;

    var spans = new Array();

    spans[0] = new Object();
    spans[0].text = currentText;

    if (selected)
    {
        spans[0].fontWeight = 700;
        spans[0].textSize = 16;      
    }
    else
    {
        spans[0].fontWeight = 400;
        spans[0].textSize = 14;
    }
   
    f.richValue = spans;
}
//</ACRO_script>
//</Document-Level>

//<Document-Level>
//<ACRO_source>highlightTextField();</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:highlightTextField(); ***********/
function highlightTextField()
{
    // get the current setting of the radio button
    var selected = this.getField("Radio Button1").value;

    highlight(this.getField("norecord"), selected==0);
    highlight(this.getField("record"), selected==1);
}
//</ACRO_script>
//</Document-Level>

//<AcroForm>
//<ACRO_source>Button17:Annot1:MouseUp:Action2</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Button17:Annot1:MouseUp:Action2 ***********/
var fucker = this.getField("date");
fucker.value = "";

//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>Radio Button1:Annot1:MouseDown:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Radio Button1:Annot1:MouseDown:Action1 ***********/

highlightTextField();


var f1 = this.getField("controlstring");
var f2 = this.getField("titleno");
var f3 = this.getField("name");
var f4 = this.getField("endquote");
var f5 = this.getField("filename");
var out = this.getField("nospaces");
var out2 = this.getField("toupper");
var out3 = this.getField("noperiod");
var str = f3.value;
str = str.replace(/ /g,"");
out.value = str;

var str2= out.value;
str2 = str2.toUpperCase();
out2.value = str2;

var str3 = out2.value;
str3 = str3.replace(/[\.,-;:&]/g, "");
out3.value = str3;

f5.value = f1.value + f2.value + "PS" + out3.value + f4.value;
var created = "Document created : \n"
var date = this.getField("date");
var today= util.printd("ddd mmm dd + yyyy", new Date());
var ar = today.split(/ /);

var postfix = "";
if (ar[2] == 1 || ar[2] == 21 || ar[2] == 31)
   postfix = "st";
else if (ar[2] == 23 || ar[2] == 3)
   postfix = "rd" ;
else if (ar[2] == 2 ||  ar[2] == 22)
   postfix = "nd";
else
   postfix = "th";

today = ar[0] + " " + ar[1] + " " + ar[2] + postfix;
var year= util.printd("yyyy", new Date());

date.value = created + today + " " + year;
date.fillColor= color.white;
date.textColor = color.black;
var titlenum = this.getField("titleno");
var id = this.getField("id");
id.value = titlenum.value + "-" + Math.round(Math.random() * 99999)
//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>Radio Button1:Annot2:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Radio Button1:Annot2:MouseUp:Action1 ***********/

highlightTextField();


var f1 = this.getField("controlstring");
var f2 = this.getField("titleno");
var f3 = this.getField("name");
var f4 = this.getField("endquote");
var f5 = this.getField("filename");
var out = this.getField("nospaces");
var out2 = this.getField("toupper");
var out3 = this.getField("noperiod");
var str = f3.value;
str = str.replace(/ /g,"");
out.value = str;

var str2= out.value;
str2 = str2.toUpperCase();
out2.value = str2;

var str3 = out2.value;
str3 = str3.replace(/[\.,-;:&]/g, "");
out3.value = str3;

f5.value = f1.value + f2.value + "PS" + out3.value + f4.value;
var created = "Document created : \n"
var date = this.getField("date");
var today= util.printd("ddd mmm dd + yyyy", new Date());
var ar = today.split(/ /);

var postfix = "";
if (ar[2] == 1 || ar[2] == 21 || ar[2] == 31)
   postfix = "st";
else if (ar[2] == 23 || ar[2] == 3)
   postfix = "rd" ;
else if (ar[2] == 2 ||  ar[2] == 22)
   postfix = "nd";
else
   postfix = "th";

today = ar[0] + " " + ar[1] + " " + ar[2] + postfix;
var year= util.printd("yyyy", new Date());

date.value = created + today + " " + year;
date.fillColor= color.white;
date.textColor = color.black;
var titlenum = this.getField("titleno");
var id = this.getField("id");
id.value = titlenum.value + "-" + Math.round(Math.random() * 99999)
//</ACRO_script>
//</AcroForm>

--end




FORM 2 with 2 buttons (not working)

---start

//-------------------------------------------------------------
//-----------------Do not edit the XML tags--------------------
//-------------------------------------------------------------

//<Document-Level>
//<ACRO_source>highlight</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:highlight ***********/
function highlight(f, selected)
{
    // set some default style parameters
   
    f.richText = true; // this field does contain rich text
    f.multiline = true; // multiline

    var currentText = f.value;

    var spans = new Array();

    spans[0] = new Object();
    spans[0].text = currentText;

    if (selected)
    {
        spans[0].fontWeight = 700;
        spans[0].textSize = 16;      
    }
    else
    {
        spans[0].fontWeight = 400;
        spans[0].textSize = 14;
    }
   
    f.richValue = spans;
}
//</ACRO_script>
//</Document-Level>

//<Document-Level>
//<ACRO_source>highlightTextField();</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:highlightTextField(); ***********/
function highlightTextField()
{
    // get the current setting of the radio button
    var selected = this.getField("Radio Button1").value;

    highlight(this.getField("nocase"), selected==0);
    highlight(this.getField("case"), selected==1);
    highlight(this.getField("social"), selected==2);
}
//</ACRO_script>
//</Document-Level>

//<AcroForm>
//<ACRO_source>Radio Button1:Annot1:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Radio Button1:Annot1:MouseUp:Action1 ***********/

highlightTextField();


var f1 = this.getField("controlstring");
var f2 = this.getField("titleno");
var f3 = this.getField("name");
var f4 = this.getField("endquote");
var f5 = this.getField("filename");
var out = this.getField("nospaces");
var out2 = this.getField("toupper");
var out3 = this.getField("noperiod");
var str = f3.value;
str = str.replace(/ /g,"");
out.value = str;

var str2= out.value;
str2 = str2.toUpperCase();
out2.value = str2;

var str3 = out2.value;
str3 = str3.replace(/[\.',;:&-]/g, "");
out3.value = str3;

f5.value = f1.value + f2.value + "BK" + out3.value + f4.value;
var created = "Document created : \n"
var date = this.getField("date");
var today= util.printd("ddd mmm dd + yyyy", new Date());
var ar = today.split(/ /);

var postfix = "";
if (ar[2] == 1 || ar[2] == 21 || ar[2] == 31)
   postfix = "st";
else if (ar[2] == 23 || ar[2] == 3)
   postfix = "rd" ;
else if (ar[2] == 2 ||  ar[2] == 22)
   postfix = "nd";
else
   postfix = "th";

today = ar[0] + " " + ar[1] + " " + ar[2] + postfix;
var year= util.printd("yyyy", new Date());

date.value = created + today + " " + year;
date.fillColor= color.white;
date.textColor = color.black;
var titlenum = this.getField("titleno");
var id = this.getField("id");
id.value = titlenum.value + "-" + Math.round(Math.random() * 99999)

var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "up-middle";
this.print(pp);

var pp2 = this.getPrintParams();
pp2.interactive = pp.constants.interactionLevel.automatic;
pp2.printerName = "Bankruptcy and Patriot";
this.print(pp2);

//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>Radio Button1:Annot2:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Radio Button1:Annot2:MouseUp:Action1 ***********/


highlightTextField();


var f1 = this.getField("controlstring");
var f2 = this.getField("titleno");
var f3 = this.getField("name");
var f4 = this.getField("endquote");
var f5 = this.getField("filename");
var out = this.getField("nospaces");
var out2 = this.getField("toupper");
var out3 = this.getField("noperiod");
var str = f3.value;
str = str.replace(/ /g,"");
out.value = str;

var str2= out.value;
str2 = str2.toUpperCase();
out2.value = str2;

var str3 = out2.value;
str3 = str3.replace(/[\.',;:&-]/g, "");
out3.value = str3;

f5.value = f1.value + f2.value + "BK" + out3.value + f4.value;
var created = "Document created : \n"
var date = this.getField("date");
var today= util.printd("ddd mmm dd + yyyy", new Date());
var ar = today.split(/ /);

var postfix = "";
if (ar[2] == 1 || ar[2] == 21 || ar[2] == 31)
   postfix = "st";
else if (ar[2] == 23 || ar[2] == 3)
   postfix = "rd" ;
else if (ar[2] == 2 ||  ar[2] == 22)
   postfix = "nd";
else
   postfix = "th";

today = ar[0] + " " + ar[1] + " " + ar[2] + postfix;
var year= util.printd("yyyy", new Date());

date.value = created + today + " " + year;
date.fillColor= color.white;
date.textColor = color.black;
var titlenum = this.getField("titleno");
var id = this.getField("id");
id.value = titlenum.value + "-" + Math.round(Math.random() * 99999)

var pp2 = this.getPrintParams();
pp2.interactive = pp2.constants.interactionLevel.automatic;
pp2.printerName = "up-middle"
this.print(pp2);

var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "Bankruptcy and Patriot"
this.print(pp);

//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>Radio Button1:Annot3:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Radio Button1:Annot3:MouseUp:Action1 ***********/

highlightTextField();


var f1 = this.getField("controlstring");
var f2 = this.getField("titleno");
var f3 = this.getField("name");
var f4 = this.getField("endquote");
var f5 = this.getField("filename");
var out = this.getField("nospaces");
var out2 = this.getField("toupper");
var out3 = this.getField("noperiod")
var str = f3.value;
str = str.replace(/ /g,"");
out.value = str;

var str2= out.value;
str2 = str2.toUpperCase();
out2.value = str2;

var str3 = out2.value;
str3 = str3.replace(/[\.',;:&-]/g, "");
out3.value = str3;

f5.value = f1.value + f2.value + "BK" + out3.value + f4.value;
var created = "Document created : \n"
var date = this.getField("date");
var today= util.printd("ddd mmm dd + yyyy", new Date());
var ar = today.split(/ /);

var postfix = "";
if (ar[2] == 1 || ar[2] == 21 || ar[2] == 31)
   postfix = "st";
else if (ar[2] == 23 || ar[2] == 3)
   postfix = "rd" ;
else if (ar[2] == 2 ||  ar[2] == 22)
   postfix = "nd";
else
   postfix = "th";

today = ar[0] + " " + ar[1] + " " + ar[2] + postfix;
var year= util.printd("yyyy", new Date());

date.value = created + today + " " + year;
date.fillColor= color.white;
date.textColor = color.black;
var titlenum = this.getField("titleno");
var id = this.getField("id");
id.value = titlenum.value + "-" + Math.round(Math.random() * 99999)

var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "up-middle";
this.print(pp);

var pp2 = this.getPrintParams();
pp2.interactive = pp2.constants.interactionLevel.automatic;
pp2.printerName = "Bankruptcy and Patriot";
this.print(pp2);


//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>county:Keystroke</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:county:Keystroke ***********/
/* This version updates a secondary combobox based on the entry selected by
** the user dynamically. The keystroke event should be processed until the
** value is about to be committed (as indicated by event.willCommit). */
if (!event.willCommit) {
     var f = this.getField("district");
     f.clearItems();
       
     /* In a keystroke event, event.change contains the non-export value of
     ** the item selected by the user. */
     switch (event.change) {
          case "Suffolk":
               f.setItems(["Eastern"]);
                break;
                case "Nassau":
               f.setItems(["Eastern"]);
          break;
          case "Kings":
               f.setItems(["Eastern"]);
          break;
          case "Queens":
               f.setItems(["Eastern"]);
          break;
          case "Richmond":
               f.setItems(["Eastern"]);
          break;
          case "Broome":
               f.setItems(["Northern"]);
          break;
          case "Cayuga":
               f.setItems(["Northern"]);
          break;
          case "Albany":
               f.setItems(["Northern"]);
          break;
          case "Bronx":
               f.setItems(["Southern"]);
          break;
          case "Allegheny":
               f.setItems(["Western"]);
          break;
                case "Chenango":
               f.setItems(["Northern"]);
          break;
                case "Clinton":
               f.setItems(["Northern"]);
          break;
                case "Columbia":
                        f.setItems(["Northern"]);
                break;
                case "Cortland":
                        f.setItems(["Northern"]);
                break;
                case "Delaware":
                        f.setItems(["Northern"]);
                break;
                case "Essex":
                        f.setItems(["Northern"]);
                break;
                case "Franklin":
                        f.setItems(["Northern"]);
                break;
                case "Fulton":
                        f.setItems(["Northern"]);
                break;
                case "Greene":
                        f.setItems(["Northern"]);
                break;
                case "Hamilton":
                        f.setItems(["Northern"]);
                break;
                case "Herkimer":
                        f.setItems(["Northern"]);
                break;
                case "Jefferson":
                        f.setItems(["Northern"]);
                break;
                case "Lewis":
                        f.setItems(["Northern"]);
                break;
                case "Madison":
                        f.setItems(["Northern"]);
                break;
                case "Montgomery":
                        f.setItems(["Northern"]);
                break;
                case "Oneida":
                        f.setItems(["Northern"]);
                break;
                case "Onondaga":
                        f.setItems(["Northern"]);
                break;
                case "Oswego":
                        f.setItems(["Northern"]);
                break;
                case "Otsego":
                        f.setItems(["Northern"]);
                break;
                case "Rensselaer":
                        f.setItems(["Northern"]);
                break;
                case "Saint Lawrence":
                        f.setItems(["Northern"]);
                break;
                case "Saratoga":
                        f.setItems(["Northern"]);
                break;
                case "Schoharie":
                        f.setItems(["Northern"]);
                break;
                case "Schenctedy":
                        f.setItems(["Northern"]);
                break;
                case "Tioga":
                        f.setItems(["Northern"]);
                break;
                case "Tompkins":
                        f.setItems(["Northern"]);
                break;
                case "Ulster":
                        f.setItems(["Northern"]);
                break;
                case "Warren":
                        f.setItems(["Northern"]);
                break;
                case "Washington":
                        f.setItems(["Northern"]);
                break;
                case "Dutchess":
               f.setItems(["Southern"]);
          break;
                case "New York":
               f.setItems(["Southern"]);
          break;
                case "Orange":
               f.setItems(["Southern"]);
          break;
                case "Putnam":
               f.setItems(["Southern"]);
          break;
                case "Rockland":
               f.setItems(["Southern"]);
          break;
                case "Sullivan":
               f.setItems(["Southern"]);
          break;
                case "Westchester":
               f.setItems(["Southern"]);
          break;
                case "Waters":
               f.setItems(["Southern"]);
          break;
                case "Cattaraugus":
               f.setItems(["Western"]);
          break;
                case "Chautauqua":
               f.setItems(["Western"]);
          break;
                case "Chemug":
               f.setItems(["Western"]);
          break;
                case "Erie":
               f.setItems(["Western"]);
          break;
                case "Genesee":
               f.setItems(["Western"]);
             break;
                case "Livingston":
               f.setItems(["Western"]);
          break;
                case "Monroe":
               f.setItems(["Western"]);
          break;
                case "Niagara":
               f.setItems(["Western"]);
          break;
                case "Ontario":
               f.setItems(["Western"]);
          break;
                case "Orleans":
               f.setItems(["Western"]);
          break;
                case "Schuyler":
               f.setItems(["Western"]);
          break;
                case "Seneca":
               f.setItems(["Western"]);
          break;
                case "Steuben":
               f.setItems(["Western"]);
          break;
                case "Wayne":
               f.setItems(["Western"]);
          break;                
                case "Wyoming":
               f.setItems(["Western"]);
          break;
                case "Yates":
               f.setItems(["Western"]);
          break;

     }
}
//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>reset:Annot1:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:reset:Annot1:MouseUp:Action1 ***********/
var clr = this.getField("date");
clr.value = "";

//</ACRO_script>
//</AcroForm>

//<AcroForm>
//<ACRO_source>search:Keystroke</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:search:Keystroke ***********/
if (!event.willCommit) {
     var f = this.getField("county");
        var g = this.getField("district");
     

     /* In a keystroke event, event.change contains the non-export value of
     ** the item selected by the user. */
     switch (event.change) {
          case "Suffolk":
               f.setItems(["Suffolk"]);
                        g.setItems(["Eastern"]);
          break;
                case "Nassau":
                        f.setItems(["Nassau"]);
                        g.setItems(["Eastern"]);
                break;
                case "Kings":
                        f.setItems(["Kings"]);
                        g.setItems(["Eastern"]);
                break;
                case "Queens":
                        f.setItems(["Queens"]);
                        g.setItems(["Eastern"]);
                break;
                case "Richmond":
                        f.setItems(["Richmond"]);
                        g.setItems(["Eastern"]);
                break;
                case "Broome":
                        f.setItems(["Broome"]);
                        g.setItems(["Northern"]);
                break;
                case "Cayuga":
                        f.setItems(["Cayuga"]);
                        g.setItems(["Northern"]);
                break;
                case "Albany":
                        f.setItems(["Albany"]);
                        g.setItems(["Northern"]);
                break;
                case "Bronx":
                        f.setItems(["Bronx"]);
                        g.setItems(["Southern"]);
                break;
                case "Yates":
                        f.setItems(["Yates"]);
                        g.setItems(["Western"]);
                break;
                case "Allegheny":
                        f.setItems(["Allegheny"]);
                        g.setItems(["Western"]);
                break;
                case "Chenango":
                        f.setItems(["Chenango"]);
                        g.setItems(["Northern"]);
                break;
                case "Clinton":
                        f.setItems(["Clinton"]);
                        g.setItems(["Northern"]);
                break;
                case "Columbia":
                        f.setItems(["Columbia"]);
                        g.setItems(["Northern"]);
                break;
                case "Cortland":
                        f.setItems(["Cortland"]);
                        g.setItems(["Northern"]);
                break;
                case "Delaware":
                        f.setItems(["Delaware"]);
                        g.setItems(["Northern"]);
                break;
                case "Essex":
                        f.setItems(["Essex"]);
                        g.setItems(["Northern"]);
                break;
                case "Franklin":
                        f.setItems(["Franklin"]);
                        g.setItems(["Northern"]);
                break;
                case "Fulton":
                        f.setItems(["Fulton"]);
                        g.setItems(["Northern"]);
                break;
                case "Greene":
                        f.setItems(["Greene"]);
                        g.setItems(["Northern"]);
                break;
                case "Hamilton":
                        f.setItems(["Hamilton"]);
                        g.setItems(["Northern"]);
                break;
                case "Herkimer":
                        f.setItems(["Herkimer"]);
                        g.setItems(["Northern"]);
                break;
                case "Jefferson":
                        f.setItems(["Jefferson"]);
                        g.setItems(["Northern"]);
                break;
                case "Lewis":
                        f.setItems(["Lewis"]);
                        g.setItems(["Northern"]);
                break;
                case "Madison":
                        f.setItems(["Madison"]);
                        g.setItems(["Northern"]);
                break;
                case "Montgomery":
                        f.setItems(["Montgomery"]);
                        g.setItems(["Northern"]);
                break;
                case "Oneida":
                        f.setItems(["Oneida"]);
                        g.setItems(["Northern"]);
                break;
                case "Onondaga":
                        f.setItems(["Onondaga"]);
                        g.setItems(["Northern"]);
                break;
                case "Oswego":
                        f.setItems(["Oswego"]);
                        g.setItems(["Northern"]);
                break;
                case "Otsego":
                        f.setItems(["Otsego"]);
                        g.setItems(["Northern"]);
                break;
                case "Rensselaer":
                        f.setItems(["Rensselaer"]);
                        g.setItems(["Northern"]);
                break;
                case "Saint Lawrence":
                        f.setItems(["Saint Lawrence"]);
                        g.setItems(["Northern"]);
                break;
                case "Saratoga":
                        f.setItems(["Saratoga"]);
                        g.setItems(["Northern"]);
                break;
                case "Schoharie":
                        f.setItems(["Schoharie"]);
                        g.setItems(["Northern"]);
                break;
                case "Schenctedy":
                        f.setItems(["Schenctedy"]);
                        g.setItems(["Northern"]);
                break;
                case "Tioga":
                        f.setItems(["Tioga"]);
                        g.setItems(["Northern"]);
                break;
                case "Tompkins":
                        f.setItems(["Tompkins"]);
                        g.setItems(["Northern"]);
                break;
                case "Ulster":
                        f.setItems(["Ulster"]);
                        g.setItems(["Northern"]);
                break;
                case "Warren":
                        f.setItems(["Warren"]);
                        g.setItems(["Northern"]);
                break;
                case "Washington":
                        f.setItems(["Washington"]);
                        g.setItems(["Northern"]);
                break;
                case "Dutchess":
                        f.setItems(["Dutchess"]);
                        g.setItems(["Southern"]);
                break;
                case "New York":
                        f.setItems(["New York"]);
                        g.setItems(["Southern"]);
                break;
                case "Orange":
                        f.setItems(["Orange"]);
                        g.setItems(["Southern"]);
                break;
                case "Putnam":
                        f.setItems(["Putnam"]);
                        g.setItems(["Southern"]);
                break;
                case "Rockland":
                        f.setItems(["Rockland"]);
                        g.setItems(["Southern"]);
                break;
                case "Sullivan":
                        f.setItems(["Sullivan"]);
                        g.setItems(["Southern"]);
                break;
                case "Westchester":
                        f.setItems(["Westchester"]);
                        g.setItems(["Southern"]);
                break;
                case "Waters":
                        f.setItems(["Waters"]);
                        g.setItems(["Southern"]);
                break;
                case "Cattaraugus":
                        f.setItems(["Cattaraugus"]);
                        g.setItems(["Western"]);
                break;
                case "Chautauqua":
                        f.setItems(["Chautauqua"]);
                        g.setItems(["Western"]);
                break;
                case "Chemung":
                        f.setItems(["Chemung"]);
                        g.setItems(["Western"]);
                break;
                case "Erie":
                        f.setItems(["Erie"]);
                        g.setItems(["Western"]);
                break;
                case "Genesee":
                        f.setItems(["Genesee"]);
                        g.setItems(["Western"]);
                break;
                case "Livingston":
                        f.setItems(["Livingston"]);
                        g.setItems(["Western"]);
                break;
                case "Monroe":
                        f.setItems(["Monroe"]);
                        g.setItems(["Western"]);
                break;
                case "Niagara":
                        f.setItems(["Niagara"]);
                        g.setItems(["Western"]);
                break;
                case "Ontario":
                        f.setItems(["Ontario"]);
                        g.setItems(["Western"]);
                break;
                case "Orleans":
                        f.setItems(["Orleans"]);
                        g.setItems(["Western"]);
                break;
                case "Schuyler":
                        f.setItems(["Schuyler"]);
                        g.setItems(["Western"]);
                break;
                case "Seneca":
                        f.setItems(["Seneca"]);
                        g.setItems(["Western"]);
                break;
                case "Steuben":
                        f.setItems(["Steuben"]);
                        g.setItems(["Western"]);
                break;
                case "Wayne":
                        f.setItems(["Wayne"]);
                        g.setItems(["Western"]);
                break;
                case "Wyoming":
                        f.setItems(["Wyoming"]);
                        g.setItems(["Western"]);
                break;

}
}

//</ACRO_script>
//</AcroForm>




---end
0
jerrycsakanyjr
Asked:
jerrycsakanyjr
  • 4
  • 3
1 Solution
 
Karl Heinz KremerCommented:
I found your question, but it will take a while to walk through the code. I'll be back ...
0
 
jerrycsakanyjrAuthor Commented:
Would help if i just emailed you the forms ?
0
 
Karl Heinz KremerCommented:
EE prefers that you make it available on the web (so that other experts also have access to it).
If this is not possible, you can find my email address in my profile.
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
Karl Heinz KremerCommented:
Did you send the files?

There is a lot of duplicate code in the button handlers. You should factor this out into a document level function (the same way you are doing this for the highlight() function).

I looked at the code, but without the actual form, it's pretty complicated (almost impossible) to find out what's wrong. I started to recreate your forms, but had to stop because I have no idea if my interpretation of your code is correct. So, if you can make the actual files available, it would be much easier.
0
 
jerrycsakanyjrAuthor Commented:
Link to website that has both forms you can download:

http://www.boundlessbeauty.net/pdf.html
0
 
Karl Heinz KremerCommented:
The first radio button on the form that does not work correctly uses a "Mouse Down" action, the second one uses a "Mouse Up" action. All three buttons on the form use "Mouse Up" actions. So, if you change the action of the first button to "Mouse Up" the form will work correctly.

The reason this does not work correctly is that when the mouse-down button is received, the checkbox is not yet selected, so you are getting the previous state (which still is set to 1). The radio button is selected of course when you click on it the second time, so you get the correct behavior in this case.
0
 
jerrycsakanyjrAuthor Commented:
Thank you!!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now