created by the script of a radio button. Need help on the Cancel button.

Hello

After you run this script, when I choose German, french or button of Italy and clicked on Cancel button, then window should be closed but it shows for example to alert respective 'German clicked u. "

Thank you

Marie rosine

var win = new window ('dialog');

win.alignChildren = 'left ';

victory. German = win.add ('radiobutton', defined, 'German');

victory. French = win.add ('radiobutton', defined, 'French');

victory. Italy = win.add ('radiobutton', undefined, 'Italy');

win.cancelBtn = win.add ("button", undefined, "Cancel");

win.quitBtn = win.add ("button", undefined, "Ok");

win.defaultElement = win.quitBtn;

win.cancelElement = win.cancelBtn;

victory. German.Value = true;

win.quitBtn.onClick = function() {}

end = 1;

Win.Close ();

}

win.cancelBtn.onClick = function() {}

end = 1;

Win.Close ();

}

Win.Show ();

If (win. German.Value is true)

{

Alert ('German clicked u')

};

If (win. French.Value is true)

{

Alert ('clicked u French')

};

If (win. Italy.Value is true)

{

Alert ('clicked u Italy')

};

var win = new Window ("dialog");
win.alignChildren = "left";
win.German = win.add ("radiobutton", undefined, "German");
win.French = win.add ("radiobutton", undefined, "French");
win.Italy = win.add ("radiobutton", undefined, "Italy");
win.cancelBtn = win.add("button", undefined, "Cancel");
win.quitBtn = win.add("button", undefined, "OK");
win.defaultElement = win.quitBtn;
win.cancelElement = win.cancelBtn;
if (win.show() == 1){
 if (win.German.value == true)
 {
  alert ("u clicked German")
 };
 if (win.French.value == true)
 {
  alert ("u clicked French")
 };
 if (win.Italy.value == true)
 {
  alert ("u clicked Italy")
 };
}

Tags: InDesign

Similar Questions

  • Hidden, Visible and back to hidden with the help of a radio button

    OK, this could be really simple for a person to answer.

    I have an option button that I use to switch between two list boxes with multiple lines of text (so visible and hidden). Here's the problem, when I switch the radio back and forward button, I have two list boxes displaying their notes at the same time. I would like to have the option button display a messages both when you switch between them. Here is my script.

    Radio Button named Violation:

    Form1. #pageSet [0]. Page 1. .Act of #subform [0] [1]. Violation::click - (JavaScript, client)

    If (this.rawValue == null) {}

    Notes.Presence = 'hidden ';

    }

    else {}

    Notes.Presence = "visible";

    }

    Radio Button named Suspension:

    Form1. #pageSet [0]. Page 1. .Act of #subform [0] [1]. Suspension::click - (JavaScript, client)

    If (this.rawValue == null) {}

    Notes2.presence = 'hidden ';

    }

    else {}

    Notes2.presence = "visible";

    }

    Notes and billets2 are list boxes. Violation and Suspension are radio buttons. Is this correct? If so, are Violation and Suspension in a group of exclusion?

    This is the requirement, breach should view Notes and hide billets2 and Suspension must hide the Notes and display billets2?

    Steve

  • FormCalc or Javascript for the radio buttons?

    I need to write a script that uses radio buttons.

    If a radiobutton is selected (my radiobuttion is called rbJanuary) then textbox1 = textbox2.

    How I write this and it's in FormCalc or Javascript? Thank you!

    Hello

    It doesn't matter what language you use for your request, it will work in both while FormCalc has a thinner syntax.

    FormCalc:

    if ($ eq 1) then
              Textfield1 = Textfield2
    else
              Textfield1 = ""
    endif
    

    JavaScript:

    if (this.rawValue === "1") {
              Textfield1.rawValue = Textfield2.rawValue;
    } else {
              Textfield1.rawValue = "";
    }
    
  • Handle radio button

    Hello

    Created a custom page with two radio buttons, depending on radio button selection it must navigate different pages.

    SLOWPOKE robette

    Hello

    vein steps below:_
    -Radio set property Action Group: FirePartailAction; event: Radio.
    -In the process form req controller get the event of the radio button.

    If ('radio'. Equals (PageContext.GetParameter (EVENT_PARAM))
    {
    -get the value of the radio button, suppose you have A r B buttons
    radioValue = pageContext.getParameter ("radioGroup") m:System.NET.SocketAddress.ToString;

    If ("A".equalsTo (radioValue))
    {
    -the value of the URl pageContextsetForward
    }

    on the other
    {
    -PagecontextsetForwrad set URl
    }

    }

    Concerning
    Meher Irk

  • Horizontal radio button group

    Hi guys,.

    No matter who never created a radiogroup element where different radio buttons is not in vertical order, but in a horizontal order? Is this possible?

    If someone happened to do this, please let me know.

    Thank you very much!
    Kind regards!

    Swed,

    Go on editing the item and at the bottom of the list of values. Increase the "number of columns"the number of items you would like to go horizontal with. "

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen
    http://sourceforge.NET/projects/plrecur

  • Adobe Java Script to change the field of reading to write based on radio button selection

    I created a form the question asked is "Do we have a credit limit?" the user can select a Yes or not by using a radio button.  If the user selects Yes we do not have a credit limit that I want the text field "CreditLimitAmount" to change the read only entry.

    Here is my code, but it does not work, someone would be able to see what I'm doing wrong?

    GetField ("CLYes"). Value
    If {(event.target.value==="Off)"}
    f.ReadOnly = false;
    f.fillColor = color.white;

    } else {}

    f.ReadOnly = true;
    f.FillColor = Color.Gray;
    }

    You have it backwards. Use this code as your radio buttons script two MouseUp and remove the code that you have applied to the text field:

    var f = this.getField("CreditLimitAmount");
    if (event.target.value=="CLYes") {
        f.readonly = false;
        f.fillColor = color.white;
    } else {
        f.readonly = true;
        f.fillColor = color.gray;
    }
    
  • Create the form in word with checkboxes, radio buttons, comment fields and signatures

    A couple of years, I have created a form that has been filled with some radio buttons and checkboxes, then sent for signatures. Example below:

    Project owner : {{                   $ReqName}}

    {{I0}} {{K0}}

    Udio has

    Project Manager:

    {{$K1}}

    {{$K2}}

    {{$K3}}

    APPROVED

    REVISE and resubmit

    DENIED

    {{SBlk1_es_:signatureblock: signer1}}

    {{#ReqName = * RequiredName_es_:sender}}}}

    Is it still possible to use, or should I drag-and - drop all the buttons?

    Hi sarahm62404467,

    Yes, you can do it with services eSign, but central form is abandoned.

    Kind regards
    Nicos

  • problem with validation in the field with the radio button type in create profile jsp page

    Hello

    Kindly help me with the validation of a field with the type option button in the createProfile jsp page. Its actually not to validate the sex with radio button field.

    The code is as follows...

    < % @ page language = "java" contentType = text/html"; charset = ISO-8859-1"

    pageEncoding = "ISO-8859-1" % >

    <! – this taglib used to access dsp tags - >

    < %@taglib uri = "" / dspTaglib "prefix ="dsp"% >"

    < dsp:page >

    < dsp:importbean bean = "/ atg/userprofiling/ProfileFormHandler" / >

    < dsp:importbean bean = "/ atg/dynamo/drop/ErrorMessageForEach" / >

      <! DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""

    < html >

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > < /title > user registration Page

    < / head >

    < body >

    < dsp:form id = "registerForm" method = "post" action = "registration.jsp" >

    < div >

    < div > if please fill in all fields below and click Save

    button. < / div >

    < br / >

    < table >

    < tbody >

    < b >

    < td width = "150" > name < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.firstName"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    Last name < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.lastName"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    < td > username < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.login"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    password < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.password"

    MaxLength = "30" size = "25" type = "password" required = "true" / > < table >

    < /tr >

    < b >

    < td > confirm password < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.password"

    MaxLength = "30" size = "25" type = "password" required = "true" / > < table >

    < /tr >

    < b >

    Identification of Email < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.email"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    Sex < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.gender"

    Type = "radio" required = "true" > male < / dsp:input > < dsp:input

    Bean = "ProfileFormHandler.Value.Gender" type = "radio" "

    required = "true" > female < / dsp:input > < table >

    < /tr >

    < b >

    < td colspan = "2" > < dsp:input bean = "ProfileFormHandler.create"

    Type = "submit" value = "Save" / > < dsp:input

    Bean = "ProfileFormHandler.createSuccessURL" type = "hidden"

    value = "index.jsp" / > < table > "

    < /tr >

    < b >

    < td colspan = "2" >

    < ul >

    < dsp:droplet name = "ErrorMessageForEach" >

    < dsp:param bean = "ProfileFormHandler.formExceptions"

    name = 'exceptions' / >

    < name dsp:oparam = "output" >

    < li > < dsp:valueof param = "message" / > < /li >

    < / dsp:oparam >

    < / dsp:droplet >

    < /ul >

    < table >

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < / dsp:form >

    < / dsp:page >

    < / body >

    < / html >

    Use code next, may be you do not value attribute set and causing a problem (data inconsistency problem) or case mismatch while storing data in the repository.

    <%Boolean checked = true;%>

    Sex:

    Male

    Female

    I do not know what will radio back button if the value is specified: a boolean value or the value aim to display (in your male cases),.

    If the problem is fixed, undo the change and please let me know what value he sent in your case.

    Please

    Thank you

    Nitin.

  • Script to detect the moment when a radio button is clicked / digital signature signed

    Good afternoon

    What is the syntax to detect whether a radio button is pressed or a digital signature field is signed?

    What I want to do is to fill in a field if the user clicks a radiobox and the user signs the form doorwindow.

    My radio boxes follow the pattern

    Group name: Group 1

    Name of choice: A, B, C, D

    Field name digital signater: boss

    Script project

    If (Group1. A == {True and this.getField("boss') .signed)

    this.getField("x").value = thisgetField("y").value

    {

    I know that the syntax is far away, but I'm trying to honor a task like thie described above.

    You don't specify what type of field 'x', but assuming that it is a text field, you can use this code as the code customized for her:

    {If (this.getField("Group_1").value == 'A' & {this.getField("boss").value! = ""})}

    Event.Value = this.getField("y").value

    } else event.value = "";

    Be aware that JS is case-sensitive, so if the name of the Group of option buttons is "Group 1" and not "Group 1", you will need to change this in the script.

  • calculation script based on the value of a radio button

    I wonder if anyone can give me help. I'm doing a calculation script that I can insert in a number field that will calculate only when a radio button is checked. I'm doing an estimate sheet when some check boxes or radio buttons are selected (such as the moving of furniture, pulling up old flooring), it will calculate a supplement based on this selection. Any help would be appreciated.

    Hello

    Paul is right, it's probably something small that is causing the script to fall. Make sure that the things you talk about in your script are correct (to the right name and the full reference in the event of different subforms).

    There is also a syntax button to tick at the top of the script editor. If you click this button, he can identify the problem.

    In which case it might be useful, here is a sample: https://acrobat.com/#d=bUfCkHbTaU0 * GD6Y7pv41w

    Good luck

    Niall

  • Change the value of the radio button using Java Script

    Hi I have a radio button "Process_mode" with two 'ONLINE' and 'Offline' values.
    based on the selection criteria, I will call the process_mode() function and if the user presses the ok button I want to change the proces_mode offline.
    Here's my java script.
    but it does not change the value of the variable.
    Please suggest how to proceed.

    function process_mode()
    {
    confirm_msg = confirm ("your search criteria is complex.") It is proposed to submit the application in offline mode. do you want offline? ») ;
    If (confirm_msg is true)
    {
    $x('p2_process_mode').value = "out of the CONNECTION";
    $x('P2_HIDDEN_PROCESS_MODE').value = "offline";
    }
    }
    doSubmit ('BTN_FINAL_COUNT');
    Alert ("your application has been submitted. Please wait until the system processes your request.') ;

    Thanks and greetings

    Ashok Salimath

    Published by: user644340 on July 19, 2009 23:11

    Hey Ashok,

    A Radio element generates actually individual boxes within a radiogroup (this is done by giving the same "name" attribute to each key). Each button has its own attribute 'ID', which will be the name of the option page more "_n" - where n is a number from 0 (zero) - so the first button will be, say, "P1_RADIO_0", then the second will be "P1_RADIO_1" and so on.

    To set the value of the radiogroup and, therefore, article, you need to 'check' one of the buttons - this is done by setting its 'checked' true value. For example, if "Offline" is the second radio button to the P2_PROCESS_MODE element:

    $x('P2_PROCESS_MODE_1').checked = true;
    

    Andy

  • Resize the system checkbox and radio buttons system

    Is it possible to resize the system checkbox and radio buttons system. If we right click on one of them and go to properties, size controls are disabled. I wonder if it's feasible.

    Also I noticed that I could add the new radio buttons to do a right-click and choosing Add new button. Is it possible to achieve this programattically.

    Kind regards

    Austin

    AustinCann wrote:

    Is it possible to resize the system checkbox and radio buttons system. If we right click on one of them and go to properties, size controls are disabled. I wonder if it's feasible.

    As mentioned, system controls cannot be customized, because they depend on the windows theme. However, here are some Boolean values, so all you need to do is use an ordinary Boolean value and import the graphics that you want in the case of true and false. They can easily be made to look like an oversized check box. More details, especially about radio buttons can be found here.

    AustinCann wrote:

    Also I noticed that I could add the new radio buttons to do a right-click and choosing Add new button. Is it possible to achieve this programattically.

    You could probably do it in edit mode programmatically by using scripts. You can't do it at run time.

    To fill a RadioButton with new Boolean values, you can simply drag the new values Boolean inside or even shift-do drag an item to create a copy of it. Don't forget to change the labels to something intuitive.

  • masking of the radio buttons

    Well, I've been up all night trying to figure this on my own. no luck. I am a print designer (25 years experience) and I took a project aiming to create an interactive pdf form. on the overview of the form and I watch some initial lynda.com training, I felt I could face it without problem.

    And THEN, a customer has sent additional info, asking that some of the options remains hidden if other options were chosen. That's where I have a problem. If I understand correctly, this requires my java script writing. Oh my!

    I read some threads here and have tried to apply (with adjustments in the button names) absolutely without success.

    I have 2 buttons:

    key 1:

    General: Bill Type

    Options: radio button choice: Admission status

    below this selection is a table with its own set of option buttons (where they chose 1)

    in this table, there are 8 buttons:

    General: Admission status

    Options: radio button choice (there are 8 buttons here): 33 X 34 X, 12 X, 31 X, 32 X, 82 X, 81 X and others

    now, press 2 (which falls under the table of radio buttons):

    General: Bill Type

    Options: radio button choice: the claim status

    Tower is, if they are found by selecting the button 2, the table of 8 radio buttons above it needs to not be available... they shouldn't be able to interact with radio buttons in the table, but I don't necessarily want to hide/disappear.

    any help would be highly appreciated.

    This little experience up to now has made me realize just how easy it is I got it for many years to design print jobs!

    Yes, I understood that. So here's what you can do. Place this code as the MouseUp event of each of the main radio-buttons:

    updateStatus();

    And then insert this code in the form of script at the document level (via Tools - Document JavaScripts):

    function updateStatus() {}

    If (event.target.value == 'Admission Status') {}

    this.getField("Admission_Status").readonly = false;

    } else {}

    this.resetForm (["Admission Status"]);

    this.getField("Admission_Status").readonly = true;

    }

    }

  • can radio buttons show/hide the info in an interactive pdf?

    Hello. I have a question to which I have been faced with during some time... hoping someone can help.

    I create a document in InDesign CS6. It's basically a guide with a joint questionnaire.

    I have forward and back buttons work properly - so that they take you from one page to another.

    However, the more difficult question is I want to have interactivity with the use of radio buttons and eventually the check boxes. Thus, for example, on page 1, I have a question multiple choice where there are three choices. Clicking the wrong answer shows a block of text saying 'no it's wrong' and clicking on the appropriate radio button shows the words "Yes, correct."

    I have created three blocks of text and make it into a multi-state object.

    Three problems:

    1. option buttons seem to be the option for "the State" in the buttons and Forms dialog box
    2. even if that were the case - the State Road seems to be only swf, non-interactive pdf form - is there a way to change this?
    3. script assuming that there IS a way, everything can be put in place so that instead of using radio buttons I have use of check boxes that only give the correct answer if the correct check boxes are selected.

    I would stick to indesign to do this, however, I think that the option is perhaps more suited for this problem?

    Many thanks in advance,

    SunsV

    1 - make 3 images and convert it into boxes option...

    Text blocks 2 2-make (Yes, his right) (No, the wrong) and convert it to buttons - rename it (Righ, evil)

    3 - Click on each radio button and apply action: Show/Hide button and form and on the visibility to activate the globe eye for buttons wrong or right.

  • The use of JavaScript with radio buttons selected to assign a variable a value

    Hey everyone, a little new in Java and try to create a form for my work to request leave.  My problem is that I'm trying to assign a variable a value if the user clicks on a radio button or another.  Currently, they are incompatible with the following information:

    Name: Radio

    ToolTip: choice

    Button Style: check

    Radio button choice: Yes (this is the value of exports, that I think that I'm not sure how to use it correctly)

    nor is checked by default, but if a box is checked, I would have a variable defined on the "Approved" text, and if the other radio button is checked I would define the variable contains "disapprove".

    Here is my code now and thanks in advance for all the help:

    var S_auth;

    function auth() {}

    If (Radio.value == 'Yes') {}

    var S_auth = "approved";

    }

    else {}

    var S_auth = 'denied ';

    }

    }

    var employees = this.getField("Emp_Name").value;

    Supervisor of var = this.getField("Supervisor").value;

    var Leave_Type = this.getField("Dropdown2").value;

    var cToAddr = [email protected];

    var cCCADDr = this.getField("Email").value;

    var cBenAddr = this.getField("Sup_Email").value; If (cBenAddr! = "") cCCADDr += ';' + cBenAddr;

    var cSubline = "Re: leave request form for" + "" + employee + ', ' + Leave_Type + ', Status: "+ S_auth;"

    cbody var is 'your request for leave was' + S_auth + 'by' + supervisor. \n' + 'save the attachment of e-mail for your records. \n » ;

    this.mailDoc({)

    bUI: true,

    cTo: cToAddr,.

    cCc: cCCAddr,.

    bassujetti: cSubLine,

    CMSG: cbody

    });

    I honestly just want to have the subject line and the body to be able to show approved or disapproved according to which radio button, the project manager chooses.

    Yes, your script is now correct and should work.

Maybe you are looking for