Using Javascript and ScriptUI to create a form that brings in a symbol from library

Hello everyone,
I've been trying to pull together the right info to use javascript to create a form to bring in particularsymbols from the symbol library based on the variables taken from the form. I've taken bits and pieces from various sample scripts and tried to make this work, but my problem appears when I try to use conditionals.
This is a limited version of what I want to do, but it is enough to get the point across.
1. I want to select a script that has various dropdown boxes. I would like the first dropdown to give me 3 options: 10, 13, 18
2. I would also like another drop down box that gives me three more options: single needle, double needle, and knife edge.
3. I would then like it to have an "ok" button and "Cancel" button.
4. From here when I click the ok button, a symbol is brought in from the library depending on what parameters were given to the form.
ex. If I selected 10 in the first drop down and double needle in the second, I would like "SYMBOL A" to be pulled from the library and centered on the artboard.
ex. If I selected 13 in the first drop down and double needle in the second, I would like "SYMBOL B" to be pulled from the library and centered on the artboard.
I've gotten the UI to pop up and it works as planned as well as bringing in a symbol, my problem comes when I try to incorporate conditionals and functions.
Here is my script. Please let me know what I'm doing wrong.
var myDoc = app.activeDocument;
var Pallette = new Window ("dialog", "Create a Shell");
Pallette.add ("statictext", undefined, "Fill Opening in Inches:");
Pallette.orientation = "row";
var myDropdown =  Pallette.add ("dropdownlist", undefined, ["10", "13", "18"]);
myDropdown.selection = 1;
var myButtonGroup =  Pallette.add ("group");
myButtonGroup.orientation = "column";
var btnCreate = myButtonGroup.add ("button", undefined, "OK");
MyFillSelection = myDropdown.selection
btnCreate.onClick = function () {
    if ( MyFillSelection = "13") {
               symbolRef = myDoc.symbols["SYMBOL A"];
        symbolItemRef1 = myDoc.symbolItems.add(symbolRef);
       redraw();
var btnCancel = myButtonGroup.add ("button", undefined, "Cancel");
  Pallette.show ();
If anyone has any input, it would be much appreciated.
thanks,

MyFillSelection = myDropdown.selection is outside the function, so it will always read "13", nothing is making the value change.
move that line into your function and add the text property to it...MyFillSelection = myDropdown.selection.text;
then do your if comparisons, that will do it.

Similar Messages

  • I've created a PDF form using Adobe acrobat. I created the forms from a PDF that I made using pages

    I've created a PDF form using Adobe acrobat. I created the forms from a PDF that I made using pages and word on Mac running Mountain lion. How do I allow the user of the form to insert JPEG files when filling out the form and how do I allow the user to add more fields or groups of fields as needed.

    The type of form yo're describing is possible if you create it in LiveCycle Designer. It may also be possible in Acrobat, but there are certain restrictions. The type of form is known as a dynamic XFA form. LiveCycle Designer is not available on the Mac, so you'd have to install the software on a Windows machine and learn how to create this type of form. The LiveCycle Designer forum here is a good resource for getting more help.
    Reader 11 now supports creating new pages using templates with a form that you create in Acrobat (Acroform). This requires some JavaScript programming. It also adds support for using a button to display a page from a PDF, which can be an image or anything else a PDF can be. So the user would click a button, be prompted to import a page from an existing PDF, and the button (or a different button) displays it as its icon. This would require the user to convert the image to PDF first, which is relatively easy these days (e.g., using Preview on the Mac, or Word on Mac/Windows). This too involves a bit of JavaScript programming, but it's very simple and straightforward.

  • I have date type list field in sharepoint list and i have created one form in sharepoint webpage.

    Hi All,
    i have date type list field in sharepoint list and i have created one form in sharepoint webpage.
    Now i want to save that field from shareepoint webpage, its declared "t1.text" but its showing error.
    How can i save this field?

    Hi AnilKarthink, 
    I wrote a Technet Wiki article on saving data to the various SharePoint fields. You can view it here: http://social.technet.microsoft.com/wiki/contents/articles/21801.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-c.aspx
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the butten is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the button is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    Hi,
    You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button Object palette, the "Submit As";
    In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
    Regards
    Bruce

  • Hello there, I am creating a database of all our companies press contacts. I would like to create a form that would act as the front end and feed the database which is obviously the back end. The database is in Access 2013. My question is to whether this

    Hello there, I am creating a database of all our companies press contacts. I would like to create a form that would act as the front end and feed the database which is obviously the back end. The database is in Access 2013. My question is to whether this is indeed possible?

    This forum thread appears to point towards the problem.
    Re: Unable to Switch Audio Sync Settings

  • RRI drilldown on structures using javascript and Web API

    Hi SDN community,
    We have devised a method to RRI on structure elements using javascript and Web API statements:
    var url = SAP_BW_URL_Get();
    zREP_UNIT_VAR1 = "ZN_MRU01";
    zREP_UNIT_VAR2 = "ZP_FPER";
    var zeroFISCYEARKey = getVar("ZPFYEAR");
    var zREP_UNITHierNodeKey = getVar("ZN_MRU01");
    var zREP_UNITHierNodeKey = trimString(zREP_UNITHierNodeKey);
    var zeroFISCPERVarKey = getVar("ZP_FPER");
    var zeroFISCPERKey = convertZeroFISCPERVarKeyToKey (zeroFISCPERVarKey);
    var zeroCURRENCYKey = getVar("ZPM_CURR");
    zREP_UNIT_TEMPLATE = "ZWT_CPERF_M50_UC_CHART";
    url = SAP_BW_URL_Get() + "&CMD=LDOC&TEMPLATE_ID=" + zREP_UNIT_TEMPLATE +"&VAR_NAME_1=" + zREP_UNIT_VAR1 + "&VAR_VALUE_EXT_1="  + zREP_UNITHierNodeKey  + "&VAR_NODE_IOBJNM_1=" + "0HIER_NODE" + "&VAR_NAME_2=" + zREP_UNIT_VAR2 + "&VAR_VALUE_EXT_2=" + zeroFISCPERKey + "&VAR_VALUE_EXT_3=" + zeroCURRENCYKey + "&CMD_1=DATA_PROVIDER%3DFY" + "%26FILTER_IOBJNM_1%3D"+ filter + "%26FILTER_VALUE_1%3D"  + parameter1 + "&CMD_2=DATA_PROVIDER%3DCMYTD" + "%26FILTER_IOBJNM_2%3D"+ filter + "%26FILTER_VALUE_2%3D"  + parameter1;
    SAPBWOpenWindow(url,"IO_Process_KPI_Report","width=screen.width, height=screen.height,menubar=yes, toolbar=no, scrollbars=yes, resizable=yes");
    Necessary conditions:
    The same Global Structure is in the Sender Query and the Target Query
    Question:
    Is there any other way to RRI on structure elements within a sender query to a target query using:
    BADI's, ABAP or any other method.
    Thank you.
    Simon

    Hi SDN Community,
    At the time of asking this question there were not many examples of BADI for RRI's.  I now see a number of examples we can use.
    Thank you.
    Simon

  • How do I create a form that is fillable and saveable with acrobat reader 9

    how do I create a form That is fillable and saveable with acrobat reader 9

    To create forms on your computer you need to purchase Acrobat Standard.
    Better yet, Acrobat Pro.
    To provide Extended form Rights you need to purchase Acrobat Professional.
    Or Standard, unless you need to enable digital signatures in Reader.

  • Does anyone know the best way to create a form that you can do a mail merge with?

    I have been asked to create a form that can be used to do a mail merge. At first I thought I could create it in indesign and then pdf the file and do form fields right in the pdf, but I'm not sure if you can do a mail merge with data in an excel file and a pdf file containing form fields.
    The other option I know I could use is a Word file and excel, but I don't think the functionality is as good as in a pdf (like addition of percentages, or error messages, radio buttons, etc.). And I do need to be able to do a mail merge. Anybody have any suggestions?

    There is not built-in feature for this, but it can be done with scripting. The problem is it can be a bit complicated, and it more complicated to decribe in much detail in a forum posting. It involves creating the base form and making the pages templates. You can export from Excel to a tab delimited text file. You can then either programmatically create a template-based FDF that when loaded into Acrobat populates the PDF form, creating as many individual forms as needed, or using JavaScript in Acrobat to read the data file and generate as many individual forms as needed. Both approaches involve a similar amount of programming, but they're quite different.
    You might want to look into this product, which apparently is no longer available but may be come back soon: http://www.debenu.com/products/eol/arts-pdf-variform-lite/

  • How do you create a form that has user permissions per form field for different user?

    I need to create a form that is used by multi people but each user needs to fill out different fields within the form. I need the first user to make selections from a list and save it to send to another (the selection fields then need to be locked). Then the other user checks one of the selections made by the first user and saves the document to send back to the first user. Not sure if this is possible. I would like the first form field selections not to even show as a highlighted field to the other user (like just be more like a text field). I want the document to be able to be used more than once. The list selections will change and need to be sent to the other user at least once a month or more. Has anyone done this?

    There's no built-in way to do that, but it's probably doable using a custom-made script to hide and/or lock the fields.

  • How do I create a form that can be edited, then mailed, then edited again?

    I am trying to create a form that would be emailed to one person, they would complete part of it, email it on to a second user who would then complete another part based on the input from the first, and then forward it onto a third for their input.
    the issue I have is that once the second person enters their information, they can not save their additions and continue the process.
    any help would be greatly appreciated.

    Interactive forms cannot be saved locally using Reader. To do local save you either have to have Acrobat on each desktop or have the form Reader-extended to enable local save in Reader. A form is Reader-enabled using the LiveCycle Reader Extensions server component.
    Steve

  • I want to create a form that I can change at an instance that will store the information without replacing it

    I want to create a form that I can change at an instance that will store the information without replacing it: Here are examples of what i have:
    This is the form:  The True/False in column B are actually check boxes
    Date
    Job Name
    Start
    End
    Hours Worked
    Per Diem
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    Arellano, Paul
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Blackwell, Zach
    FALSE
    Christian, Charles
    TRUE
    Wednesday, Mar 5, 2014
    Duke University
    7:30 PM
    2:30 AM
    7.00
    0.00
    Christian, John
    FALSE
    Currence, John
    FALSE
    Curtis, Brandon
    FALSE
    Hawkins, Tyre
    FALSE
    King, Corey
    FALSE
    Nunez, Jose
    FALSE
    Rangel, Antonio
    FALSE
    Rice, Eric
    FALSE
    Salgado, Ricardo
    FALSE
    and the sheet that the index to looks like:
    Saturday, Mar 15, 2014
    Rice, Eric
    Providence College
    9:00 AM
    7:30 PM
    10.50
    1
    Saturday, Mar 15, 2014
    Rice, Eric
    Virginia Beach
    7:30 PM
    2:30 AM
    7.00
    Saturday, Mar 15, 2014
    Salgado, Ricardo
    0.00
    Sunday, Mar 16, 2014
    Arellano, Paul
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Blackwell, Zach
    0.00
    Sunday, Mar 16, 2014
    Christian, Charles
    0.00
    Sunday, Mar 16, 2014
    Christian, John
    0.00
    Sunday, Mar 16, 2014
    Currence, John
    Providence College
    7:00 AM
    8:00 PM
    13.00
    1
    Sunday, Mar 16, 2014
    Curtis, Brandon
    0.00
    I want to be able to fill out the form and it place itself into Sheet 1 without changing everytime.  I can index the array from the form, but it changes everytime.

    You think it would be the other way around.
    Just speculation, but forms probably came to iOS first because of likely use for data entry in the field that syncs back to the Mac.  On a small screen with a touch interface, forms make inputing values easier.
    On the Mac, with its bigger screen, typing directly into a data table often works well enough.
    SG

  • Create fillable forms that automatically fill out a letter

    Hi, so I'm new to acrobat (and adobe in general) and I wnated to know if anyone had a way of doing this. So what I want to do is to create a form that takes people's information. It will take things like Names, Phone numbers, emails, etc. Then, it will ask them to choose what kind of form they want to create. So, it could be a letter, or a memo, whatever. Based on their choice, I then want to make another form, with all of their information filled in for them, appear. I've made a form for the first part, but I would like to know if anyone could explain how to do the second part, where it creates the new page for me.

    If the end user is using Adobe Reader to fill this out then no, it isn't possible.
    I can say whether it would be possible if all parties are using Adobe Acrobat but I doubt that it is.
    You chould probably look in to creating a web application that can generate a PDF.

  • Creating Secure Form that Outputs from a Database?

    I need to create a form that pulls data from a database (of any format) based on what the user enters.  Specifically, I want a customer to be able to enter their name in a field and output data based on their name.  I was about to use a standard PHP mail form methodology, but I realize this would be insecure (I would like to keep my customer list hidden).  Can someone offer a suggestion on what I should look for in creating a secure form/database output structure for my site?  Even if it's just the name of the method so I can search for a tutorial.  Thank you!

    Does it matter that anyone could enter the right name in the form to return the customer data? If so you need to use a password.
    1. Create a form through which the customer can register their details with a user name and password.
    2. On the server side hash the password with something like SHA256 (plenty of open source implementations about or you can create your own).
    3. Store the customer details together with a userid and hashed password in the server database
    4. Create a form through which the customer can request their details, and asks them for their userid and password.
    6. On the server side, rehash the password from the form and request a row from the customer database where the userid and hashed password match an entry
    7. Return the customer data if row retrieved from database else return a message saying on data matching those details etc.
    Regards
    Phil

  • I want to create a form that i can drop pictures in a certain place

    i want to create a form that i can drop pictures into

    Unfortunately Formscentral does not support drag and drop pictures into your form. If you want to form filler submit their images with other form data, you can use file attachment field. Add an file attachment field when design form, so that form filler can add their image file into it and submit with other form data.
    Thanks,
    Pengpeng Sun

  • Is there a way to take an existing PDF and make it into a form that will aggregate the responses?

    Is there a way to take an existing PDF and make it into a form that will aggregate the responses? 

    Sabian has pointed you to an older Acrobat X tutorial.
    It depicts the use of acrobat.com "workspaces".
    "Workspaces" are going away soon.
    See:
    https://forums.adobe.com/docs/DOC-4203 
    So, what is shown in the Adobe TV session is, basically, obsolete.
    For forms you may want to give acrobat.com's (now "Adobe Document Solutions) FormsCentral subscription service a look-see.
    https://new.acrobat.com/en_us/products/formscentral.html 
    Be well...

Maybe you are looking for

  • External and onboard sampling in parallel

    Hello everybody, I made a simple example to demonstrate what I am trying to achieve but my problem can be summarized with one question: Is it possible to have in parallel one task that samples channel AI0 with the onboard clock and another task that

  • 'Backend systems with Release 701 are not supported'

    while BBPGETVD transaction is run below error is seen, 'Backend systems with Release 701 are not supported' Please help to resolve it.

  • Help on new feature in SP 14

    Hi, we upgrade to SP 14 now and I find somthing I don't know how to handle. If I choice Interface determination I have a new area called TITLE_IDTYPE with two options RB_CLASSIC and RB_SPLIT - does anyone know how to use it? THX Matt

  • Prompt default values

    Hi guru's i have following prompt region: 'all column values' year : ' all column values' month: 'all column values' week: 'all column values' Instead of 'all column values' i want to display the for region prompt : ' all region values' Regards Betha

  • Where can I get info about Equium M50-236?

    Hey. I have check all over the internet for information about my laptop but there is no info. I think there must be info on Toshiba site, but no, and I think is very bad. My laptop is an Equium M50-236 (PSM57E-005009FS). The info I looking for is lik