Spry if to select from a form drop down

I asked this question over a week ago and I haven't recieved
much in response. I really need to get this figured out. I have a
form with a dropdown list and I want to select the value that
corresponds to the value returned from the database. In ASP it
would look something like this:
<select name="phone1_label" id="phone1_label">
<option value="home" <% IF Lable1 = "home" Then%>
selected = "selected"<%=End IF%>>home</option>
<option value="office"<% IF Lable1 = "office"
Then%> selected = "selected"<%=End
IF%>>office</option>
<option value="fax"<% IF Lable1 = "fax" Then%>
selected = "selected"<%=End IF%>>fax</option>
</select>
I am trying to accomplish the same thing using spry if, but
am not having much luck. I can get it to work fine if I create a
table and have the list dynamically created, however I have a form
with several dropdown lists and I don't want to have to create a
spry dataset for every one of them. I have created a test page to
work from to get this to work. The phone_lable should select
"office" for all 3 records. It can be found at this address:
http://homesandagents.com/Members/test.asp
Here is the code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
<style type="text/css">
<!--
.myHoverClass {
color: #000;
background-color: #68A0BB;
cursor: pointer;
.myHeaderHoverClass {
cursor: pointer;
.rowSelected { color: #000000; }
.oddRow { color:#333333;
background-color: #DBE1F0;
.evenRow { color:#333333;
background-color: #F8F8F8;
-->
</style>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/xpath.js"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var dsContacts = new
Spry.Data.XMLDataSet("export_contacts.asp?sort=A",
"contacts/contact");
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td width="30%" valign="top"><div
spry:region="dsContacts">
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
<tr spry:repeat="dsContacts" spry:hover="myHoverClass"
spry:select="rowSelected" spry:setrow="dsContacts"
spry:odd="oddRow" spry:even="evenRow">
<td
class="myHoverClass">{contact_first_name}</td>
<td
class="myHoverClass">{contact_last_name}</td>
</tr>
</table>
</div></td>
<td valign="top"><form id="form1" name="form1"
method="post" action="">
<div spry:detailregion="dsContacts">
<label>First Name:
<input name="first_name" type="text" id="first_name"
value="{contact_first_name}" />
</label>
<p>
<label>Last Name:
<input name="last_name" type="text" id="last_name"
value="{contact_last_name}" />
</label>
</p>
<p>
<label>
<select name="phone1_label" id="phone1_label">
<option spry:if="'{phone1_label}' == 'home'"
selected="selected" value="home">home</option>
<option spry:if="'{phone1_label}' != 'home'"
value="home">home</option>
<option spry:if="'{phone1_label}' == 'office'"
selected="selected" value="office">office</option>
<option spry:if="'{phone1_label}' != 'office'"
value="office">office</option>
<option spry:if="'{phone1_label}' == 'fax'"
selected="selected" value="fax">fax</option>
<option spry:if="'{phone1_label}' != 'fax'"
value="fax">fax</option>
</select>
</label>
<label>
<input name="phone1" type="text" id="phone1"
value="{phone1}" />
</label>
</p>
</div>
</form>
</td>
</tr>
</table>
</body>
</html>
Any help would be greatly appreciated!!!

Hi there,
Please look at this thread,
http://forum.sun.com/jive/thread.jspa?messageID=333100
The customer there has 1-2 suggestions on how you can do this.
Thanks
K

Similar Messages

  • When I select an option from the help drop down menu it just goes away. It does not go to the help option I chose.

    When I select an option from from the help drop down menu it just goes away. It does not go to the query I selected by hitting the keypad.

    Jody
    you don't tell us Device or OS?
    Quoted from  Apple's "How to write a good question"
       To help other members answer your question, give as many details as you can.
    Include your product name and specs such as processor speed, memory, and storage capacity. Please do not include your Serial Number, IMEI, MEID, or other personal information.
    Provide the version numbers of your operating system and relevant applications, for example "iOS 6.0.3" or "iPhoto 9.1.2".
    Describe the problem, and include any details about what seems to cause it.
    List any troubleshooting steps you've already tried, or temporary fixes you've discovered.
    ÇÇÇ

  • Acrobat 8 Professional 8.1.2 crashes When selecting "Rotate Pages" from the "Document" drop down men

    When selecting "Rotate Pages" from the "Document" drop down menu Acrobat 8 Professional 8.1.2 crashes. Every time, no error mesage. Have run "Repair Acrobat Installation" with no success. Any suggestions? Thanks

    I am also experiencing the same problem only recently.  I have used the program for almost a year without any problems except now.  Adobe Acrobat 8 standard, ver 8.1.5.
    Whenever I insert pages or rotate, I get an immediate shut down window, “Adobe Acrobat 8.1 ahs encountered a problem and needs to close.
    I am no longer able to use this program.  Abobe Acrobat 5.0 still works fine.  Does anyone have a solution?  I already did a repair and reloaded the program.

  • Since upgrading to Firefox 4 I've been unable to select search items from the google drop down box in the toolbar. Instead, I have to retype my search item completely as I also unable to select 'auto-complete' items as they appear.

    Since upgrading to Firefox 4 I've been unable to select search items from the google drop down box in the toolbar. Instead, I have to retype my search item completely as I also unable to select 'auto-complete' items as they appear.

    Known problem with the Google Toolbar extension. <br />
    http://www.google.com/support/toolbar/bin/static.py?page=known_issues.cs

  • Populate elements in a drop based on selection made in another drop down

    i need to populate elements in a drop based on selection made in another drop down list. have created list models for populating data from R3. I am using PDK for java development.

    hi,
    to populate the second dropdown from the selection of the first u need to the submit the form on the selection of data from dropdown and based on the selection populate the second dropdown.
    If using jspDynpage u can submit the form on the  ''onChange" event of first drop down.
    If you can let us know what type of application is this i think we can help you in more better way.
    Thanks
    Ritushree Saha

  • Crystal report Chose from List or drop down value in parameter from UDT

    Hi Experts,
    I had face a issue while creating a report for my client in crystal report , I had create a report and in the parameter field I want to select the value from the chose from list or drop down value from the User define table.
    In parameter had written field as : Code@Select * from dbo. [@UDT] ;  but in the report filled I am not able to select the value.
    Please Help me ! Thanks in Advance. :

    HI
    Welcome to the Forum...
    You cannot put all the values in a single parameter field so you need to select each field for each parameter...
    Better you post it in this link for more reponses:
    Reporting and Printing

  • How do you remove old email addresses from the invitee drop down menu in Calendar

    How do you remove old email addresses from the invitee drop down menu in Calendar

    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Caches/com.apple.iCal/Previous Recipients.plist
    Right-click or control-click the line and select 
    Services ▹ Reveal
    from the contextual menu.* A folder should open with an item selected. Quit the application if it's running. Move the selected item to the Desktop, leaving the window open. Relaunch the application and test. If there's no change, quit again and put the item you moved back where it was, overwriting the one that may have been created in its place. Otherwise, delete the item you moved.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • Since update, all CC apps no longer will launch from menu bar drop down

    Accepted prompt to update CC apps, and now the menubar drop down menu lists two versions of every app I've installed — one with "(2014)" after the name.
    And none of the apps will now launch from the menubar drop down CC app list.
    How I downgrade back to the CC version that actually worked fine?

    Does turning off OpenGL in the Performance Preferences and restarting Photoshop have any bearing on the issue?
    Please read this and provide the pertinent information:
    http://forums.adobe.com/docs/DOC-2325

  • Back button on IE 11 does not load the dropdown selections from previous form

    We have a site in clasic ASP. There is a search criteria form with a few drop downs and a few radio buttons. While working in IE 11, When this form filled and submitted, the results show up. When the back button is hit, the previous form loads but the selections
    are lost. This works perfectly fine in IE 9. What has changed in IE 11 that this does not work. 
    Is there some setting that can get this feature back.
    Arun 

    Hi,
    your question would be better answered in a developers forum. Include with your question a link to your website so that it can be tested.
    usually the query parameters from a get request are used to populate a form with previously entered values. You may have coded your page to always refresh from the server.
    IE documentation for developers can be found here -
    http://msdn.microsoft.com/en-us/ie/ - there are no MSDN support forums for classic asp.
    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to
    raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Rob^_^

  • Form popping up certain information once selection is chosen in drop down menu.

    Is if possible that I could have a drop down menu and once a selection is made it displays a "set information section" with pictures and logo's etc. pop's up according to that selection?

    Hi,
    Yes it is possible. you would put the respective groupings of pictures and logos in separate subforms. The subforms can be stacked one above the other and their presence set to hidden.
    Then in the exit event of the dropdown you would have either an if statement or a switch statement to change the presence:
    if (this.rawValue == "My Company")
         myCompanyLogo.presence = "visible";
         yourCompanyLogo.presence = "hidden";
    else if (this.rawValue == "Your Company")
         myCompanyLogo.presence = "hidden";
         yourCompanyLogo.presence = "visible";
    else
         myCompanyLogo.presence = "hidden";
         yourCompanyLogo.presence = "hidden";
    Basically you are setting up white space in the form and then showing the appropriate logo/picture. Here is an example of dropdowns doing different things: https://acrobat.com/#d=jD3k1sL7PGcTo6CHHTiEOA
    There is another way. You can have the logos and pictures in the form as 'image' objects that are hidden and then have an 'imagefield' object in the white space. Then the dropdown script would set the rawValue of the 'imagefield' to match the appropriate hidden 'image' object. An example is here: https://acrobat.com/#d=BI-C*vM-cryysNXA9Hpt5A
    Hope that helps,
    Niall

  • Multiple NOT-IN selection from within Forms 6i

    I have a form, in which the user can put several varchar2 IDs (es. 'A0', 'B3', 'CJ',...). Then, I have to execute a query like this:
    INSERT INTO FOO
    SELECT *
    FROM BAR
    WHERE ID NOT IN (...values put by the user...)
    - The list of the user values has an undefined length
    - I can't create a temporary table on the DB
    Is there a solution to my problem?
    Thanks in advance.

    You definitely can use dynamic sql. Here is an alternative:
    select replace(substr(','||:str,pos+1,4),'''','') from
    (select instr(','||:str,',',1,n) pos from
    (select rownum n from dba_objects where rownum < 1000) pivot
    where instr(','||:str,',',1,n) > 0) a
    assuming you will have maximum 1000 codes in the string, if not, change it accordingly, and assuming your codes are always 2 characters, otherwise, change the logic a bit. :str is your string 'AJ','B3','CJ'...

  • Portal Freezes when interactive form drop down is selected..

    Hi Experts,
    We are facing a strange problem with the drop downs in interactive form. We developed an interactive form with dynamic internal tables and Automatic dictionary search helps attached.
    Before upgrading SAP SP 27 we were able to use it without any problem. Now whenever we select a drop down in the adobe form complete portal is freezing.
    More suprising is this is working fine in Mozilla firefox and not in internet explorer 8.0.
    Kindly let us know how to fix this.
    Thanks a lot in advance.
    Best Regards,
    Phani.

    Hi Raghavendra,
    I tried with compatibility view. Still the portal is getting freezed.
    Now adding to the surprise when we rebooted the portals adobe form is not getting freezed but the portal is getting freezed. i.e. I can enter data on adobe but can not navigate to any other links in portal. All of them are freezed.
    Kindly let me know the solution.
    Thanks,
    Phani.

  • Populating the data from table onto drop-down list.

    Hi all
    The following code i have used in trigger 'when-new-form-instance'
    DECLARE
    group_id RecordGroup;
    list_id Item := Find_Item('Lines.classification');
    status NUMBER;
    rg_name varchar2(10) := 'rgroup';
    BEGIN
    clear_list(list_id);
    group_id := Find_Group(rg_name);
    IF NOT id_null(group_id) then
    Delete_Group(group_id);
    End if;
    group_id := Create_Group_From_Query(rg_name,
    'select meaning from lookup_values where lookup_type='TC_CLASSIFICATION' and lookup_code in('BUSINESS','PERSONAL')');
    status := Populate_Group(rg_name);
    Populate_List(list_id, group_id);
    END;
    i have created a Record_Group from Object navigator(name:'rg_name').
    and used it in the above code.
    after this i try to run the form, i am not able to see the value which i drop-down list
    can any one suggest me abt this, and any changes i need to do in the property pallet,...
    Thanks
    Raj

    u3 wrote:
    No, Populate_List requires that the record group is created at runtime.Actually you're wrong ;)
    POPULATE_LIST works with both, record groups created at runtime AND at design time.
    Try the below code on SCOTT schema with a list item and a button trigger:
    Record Group created at design time
    DECLARE
         RG_NAME VARCHAR2(10) := 'RGROUP';
         V_DUMMY NUMBER;
    BEGIN
         CLEAR_LIST('LIST_ITEM1');
         V_DUMMY := POPULATE_GROUP(RG_NAME);
         IF V_DUMMY = 0 THEN
              CLEAR_LIST('LIST_ITEM1');
              POPULATE_LIST('LIST_ITEM1', RG_NAME);
         END IF;     
    END;
    Record group Created at Runtime
    DECLARE
         GROUP_ID RECORDGROUP;
         RG_NAME VARCHAR2(10) := 'RGROUP';
         QUERY_TEXT VARCHAR2(1000) := 'SELECT ENAME, TO_CHAR(EMPNO) FROM EMP';
         V_DUMMY NUMBER;
    BEGIN
         CLEAR_LIST('LIST_ITEM1');
         GROUP_ID := FIND_GROUP(RG_NAME);
         IF NOT ID_NULL(GROUP_ID) THEN
              DELETE_GROUP(GROUP_ID);
         END IF;
         GROUP_ID := CREATE_GROUP_FROM_QUERY(RG_NAME, QUERY_TEXT);
         CLEAR_LIST('LIST_ITEM1');
         V_DUMMY := POPULATE_GROUP(RG_NAME);
         IF V_DUMMY = 0 THEN
              CLEAR_LIST('LIST_ITEM1');
              POPULATE_LIST('LIST_ITEM1', RG_NAME);
         END IF;     
    END;It does work with me both ways, I suggest you test it.
    Tony

  • Have an onchange event in SPD to update a list based on user selection of data view drop down?

    Hoping someone can point me in the right direction: I have a list for Media announcements, each one of these announcements will have various types of documents associated (via look up field in the doc library). I am trying to have a data form web part (dropdown)
    as the selector (as I am not liking the SharePoint list filter feature) to have a user be able to select the Media Title, then it refreshes the three web parts on the page (1 for the announcement, then one for type1 docs and one for type 2 docs.)
    What is the best way to create an onchange event to have the selected option be connected to the first web part (media title on a list view) so that the information on the page can all be filtered?

    Hi,
    Would you mind providing more details about your requirement? Are there one Announcements list and two Document Library in a page?
    Suppose you have one Announcements list and two Document Library in a page, then you want to add a Drop Down Menu(not the OOTB SharePoint List Filter Web Part) to filter the
    three List View Web Part dynamically.
    There will be two workarounds:
    1. Use the OOTB “Connections” feature of the list to “Get Filter Values From” one of the three lists, then there will be a “Select” button in that list, we can click it to filter
    other two lists/libraries. This is a way without code though we may not have the Drop Down Menu;
    2. Add three <iframe> in a page, then add a Drop Down Menu in this page. Now, we will need some JavaScript to listen to the onchange event of this Drop Down Menu. We can
    get the values populated in the Drop Down Menu from one of the column of one of the list, when making a selection in it, we can pass an URL with query strings to the three iframes which will show the three different lists or libraries.
    The second way requires some code to interact with Client Object Model cause we need to get values from a list, some script to handle the onchange event, which seems more suit
    with your need.
    Here are some links might be helpful if you want to take the second way:
    About how to find a specific element on a page using JavaScript:
    http://javascript.info/tutorial/searching-elements-dom
    Handle the onchange event using jQuery.change function:
    http://api.jquery.com/change/
    About query string to filter a list view:
    http://techtrainingnotes.blogspot.com/2012/03/sharepoint-search-filter-or-sort-lists.html
    About change the src attribute of iframe:
    http://stackoverflow.com/questions/3730159/changing-iframe-src-with-javascript
    http://www.w3schools.com/jsref/prop_frame_src.asp
    Best regards
    Patrick Liang
    TechNet Community Support

  • Pre-Populating Text fields from a Data drop down list using SQL Server

    I'm currently trying to update some of our internal forms which are word based or a basic PDF form you fill in by yourself.
    I'm connecting to our SQL server as there are databases stored there for an internal bit of software that hold information
    I can use to fill in parts the form.
    I have a data drop down list that is dynamically linked to the SQL databass and allows you to select a Project Number from that database, what
    I want to do after this is selected is to automatically populate some text fields with the Project name, Account handler and other fields held in the
    database.
    I've had a look online to see if there is a solution but haven't really found anythig that is similar (although I am new to LC so may have seen it
    and not realised) and my Java is non existant.
    Has anyone tried this and able to point me in the right directions?
    I'm using LiveCycle ES2 version 9.0.0.2 from Creative Suit 5.5 on Windows 7
    Cheers

    Hi,
    Actually this error does not cause any harm except a presentation inconvenience. In my multi-select prompt I am using variable expression with dynamic repository variable. Dashboard results are correct. Just variable's value does not appear on page (error Error Codes: G689FFB3:SDKE4UTF
    Expression: @{biServer.variables['CUR_CAL_PER_MONTH_NAME']}). Pushing "GO" button on the prompt fixing the error but it's actually second execution of the dashboard.
    Any ideas ??

Maybe you are looking for