drop-down list and using the selected command to select the fill element

Hi I have a menu drop down being populated by a mysql table, the drop-down list works fine with reading and updating, but I wish I had the mysql stored id to select from the drop-down list on the edit page.

I have the following code, but I can't point to be selected?  I think it is because I have not coded if statement properly.

< select name = "stand_id" >
<? PHP
$stand_set = getall_stands();
While ($stands = mysql_fetch_array ($stand_set)) {? >}
<? PHP if (isset($_POST['stand_id']) == $url_show ['stand_id']) echo ' selected = "selected".
« ' ; ? >
"< option value =" <? PHP echo $stands ["stand_id"];? ' > '.

> <? PHP echo $stands ["stand_descrip"];? > < / option >
<? PHP}? > < / select >

Any help would be really appreciated

Horsemad Gilly wrote:

the argument would be compared with $url_show ["stand_id"], ["stand_id"] $stands and then selecting the $stands ["stand_id"]

selected = "selected".

Tags: Dreamweaver

Similar Questions

  • Automatically populate a drop-down list by using another selection from the drop-down list box

    New java/preparation forms so I apologize in advance.

    I currently have a menu drop-down box 1 (Occupation) with three options: "enter your own description/blank", retired housewife. When someone chooses either retirement or anyone at home, I would another drop box 2 (employer) to assign automatically "n/a. . The employer drop box has only two options: "enter your own/blank", N/A.

    Far, I could for that box to fill but only when the person clicks in the box (as if they were about to enter their own text.) Then only it will fill the drop-down list "employer." I would like it auto fill once the person has chosen retired, Virgin or stay-at-home woman without having to enter in the box (just using the arrow to the size of the drop-down list box).

    I currently have a key shot that resets the employer box when a person chooses the option vacuum/enter your own option. I then a JavaScript (only for the housewife now) that only works if you click the box of. Key combination works I want to than the other options work as well. If the client settles on white, the choice of the employer updates automatically empty without having to click in the box of. Any help (including general advice to make my code cleaner) is very appreciated!

    Current script of typing:

    If {(event.willCommit)

    If (event.value == "") this.resetForm (["use"]); of other SetFieldValues (event.value);

    }

    The current upward, mice running JavaScript :

    var v = this.getField ("Occupation") .value

    If (v is "Housewife")

    1. this.getField("Employer").value = "N/a".

    I think maybe I should use event.willCommit in my formula, but I'm not sure how to include it.

    Thank you!

    I would not use the key sequence or MouseUp actions for this, but the action post.

    Just make sure that you set the field option to validate the selected value immediately (under Properties - Options) and then use this code as the custom validation script:

    var employerField = this.getField("Employer");
    if (event.value=="Homemaker" || event.value=="Retired")
        employerField.value = "N/A";
    else employerField.value = employerField.defaultValue;
    
  • Value of the drop-down list instead of the text

    I want a drop-down list that includes complete definitions for the user to watch but when they choose the item they want only the abbreviation indicating on the form. For example, in my items list is said 'Illinois', but when they select "Illinois" she fills the field with the bind value of 'IT '. Is this possible?

    See the attached file... If it helps...

    I place a TextField on the top of the drop-down list and setting the rawValue selected the TextField... In the case of exit of the combo I hide list drop-down and display of the textfield object. Similarly, in the event you enter in the text field, I am displaying the drop-down list field and hide the text field.

    This way I can show 'IT' If you choose "Illinois" in the menu dropdown.

    https://Acrobat.com/#d=7Y0qDg-ld6nWNxw8G-0cNg

    Thank you

    Srini

  • Select from a drop-down list and the specified element values are displayed in the textfield

    I need for one to be able to select from a list drop-down and specified the item values appear in textfield.

    For example, if I select Amy

    If I select Bob

    If I select Jane

    Amy

    Bob

    Jane (I want to appear as shown in the list)

    I associated a value to each item in the drop-down list so that the choice is easy to compare and determine what initial (default) value to the value in the text field. In my drop down list change event, I have the following:

    var sNewSel = this.boundItem (xfa.event.newText);

    Switch (sNewSel)

    {

    case '1': / / Amy

    TextField1.rawValue = "Amy \n";

    break;

    Switch (sNewSel)

    {

    case '2': / / Bob

    TextField1.rawValue = "Bob \n";

    break;

    Of course that's not work one name shows at a time. Help, please!

    Thank you

    Don't know what the code is supposed to do, but basically, you want to add the name of the drop-down list the addition on the current value of the TextField? Why not use the dropdownlist display value directly? For example on the change event:

    if ( TextField1.rawValue == null )
        TextField1.rawValue = xfa.event.newText;
    else
        TextField1.rawValue += ( "\n" + xfa.event.newText );
    
  • I have one drop-down list box where one selection (options) is the other.

    I have one drop-down list box where one selection (options) is the other. If a user selects the other, I want to conceive the possibility for them to enter some Notes to describe their other. A pop-up window or the text box is possible? Do not know how to approach the issue... Thank you!

    The field in parentheses is the text (or drop-down menu or other) you want to display when "Other" is selected and hide when it is not.

    If you want to apply the same logic to several fields just duplicate this line of code, the field name in each copy of setting.

  • Display the export value of the drop-down list instead of the element

    I'm showing the value to the export of a drop-down list instead of the selected option or the user selects BLACK, but the value of exports of BLK is actually displayed.  I can find many discussions on how to get the value of the exports and display it or use it to trigger another answer in another area and I can usually tweak my existing JavaScripts when I need something new, but I just can't wrap my head around this!

    This is my last attempt (failed)

    var f = this.getField ("eyes");

    If (event.value is 'Black - BLK')

    f.Value = "BLK".

    I use Acrobat PRO DC.

    Any help is appreciated,

    Thank you

    Xavier


    I've been doing this for a long time and have never heard of anyone who wants something like this, so it is interesting. Remove your current script and try the following script Format customized drop eyes:

    Custom drop-down list Format script

    Event.Value = event.target.getItemAt (event.target.currentValueIndices, true);

    This defines what is displayed in the drop-down list in the value of exports of the selected item. Select the 'Value selected to validate immediately' option to the drop-down list for smoother operation.

  • Drop-down list disappears first time selected.

    Drop-down list disappears first time selected.  I had a form of work for more than 4 years.  has worked this week.  Today, I downloaded the production version.

    When I went to test (with no changes), all of my fall from the bottom disappear the first time I have select them.  the second time, they remain and I can select the data.

    using Live Cycle 8.2.

    Sorry, the second time now that you have selected the same drop down, it was ok.  It was both in "Overview" in the workbench as a player.

    For anyone else who hits, I could correct.  Our computers have gone through automatic updates and I had to re - start.  That's when he seemed to start happening.

    before I went home last night, I totally stop computer and turned it back it.

    Seems ok now.

    Thanks for the reply

  • Connecting 2 fields drop-down list and have some appear field

    I've read about the binding of the two drop-down lists when you select something in the first box and then it adjusts the options in the second drop-down list box.  I love those who can use in the future.  I have a question a little.

    Can I have two lists that both selections control what fields appear below drop-down list?  For the examples list 1 to A, B and C list 2 has red, Orange and yellow.  I'll choose different combinations of the two and have different things to be displayed.  At Red and has fields 1, 2 and 3 show.  B and yellow display 1 and 3 and so on.

    Is this even possible or do I need to create different combinations all in one field and script the different responses that, I think I know how to do?

    Thank you!

    Hello

    The problem is that you are hiding the subform, BUT you try to assign to the presence of individual boxes in the subform visible. It won't work, because the subform itself is set to hidden.

    Look at the boxes to check and see if you can group them in series that are always hidden or visible. Then script against subforms and NOT the boxes. If you can not group the boxes then you will just have to refer to them individually.

    The textfield object was just a typo.

    Niall

  • Not drop-down list values in the XML that is generated after completing the form

    Hello

    I have a form that has a drop-down menus of the filling of an XML file, the items in drop-down list to a text and value associated with it.

    The problem is when I generate the XML of the form value labels are coming in instead of the text in the drop-down list.

    Pls help. How can I get the text of the value of the dropdown list selected in the XML file?

    Thank you

    Ludovic

    Hello

    I would recommend going to the object > linking the palette and deselecting 'specify values ". In this way, the display values will be included in the XML, as the display value will be the same as the .rawValue from the drop-down list.

    However, this means that any script that references the drop down menus will use the values to display for the items and not the previous related values.

    Hope that helps,

    Niall

  • Try to fill a text field of a zone drop-down list by using an 'if' statement

    I am filling a text field (modelT) with the text corisponding in the 'data' part of the selectedItem in the drop-down list box. The 'data' appears correctly when I use:

    modelT.text = event.target.selectedItem.data;

    But I'm calling it with an "if" (in red) and subsequently, I can dynamically fill the text field of the multiple drop-down list box. am I missing something simple, here is my code:

    Import fl.controls.ComboBox;
    Import fl.data.DataProvider;
    Import fl.managers.StyleManager;

    var cPurpose:Array = new Array)
    {label: "Execute task", data: "1"},
    {label: "Transportation equipment", data: "2"}
    );
    var purCb:ComboBox = new more;
    purCb.dropdownWidth = 260;
    purCb.width = 260;
    purCb.move (10, 300);
    purCb.prompt = "object of truck?
    purCb.dataProvider = new DataProvider (cPurpose);
    purCb.sortItemsOn ("label");
    purCb.addEventListener (Event.CHANGE, purchangeHandler);

    addChild (purCb);

    function purchangeHandler(event:Event):void {}
    trace ("Selected" + event.target.selectedItem.data);
    purT.text = event.target.selectedItem.label;
    purCb.selectedIndex = - 1;

    If (event.target.selectedItem.data == 1)
    {
    modelT.text = "T660"
    }
    If (event.target.selectedItem.data == 2)
    {
    modelT.text = "W900;
    }

    Thanks in advance for your help

    You must delete or move the following line so that it is not set to zero for the combobox control before trying to read what is selected:

    purCb.selectedIndex = - 1;

  • Some Web site drop-down lists and some inactive features - Mac

    On a Mac and only in the last 6 months.
    My Bank has updated its interface (more dynamic, possibly using Ajax), and Firefox is unable to view my account information. Safari and my PC can.
    Various Web sites that have drop-down lists for searches, the menu drop-down is inactive (iStockphoto.com main search). I find this issue more with recent (now 13) Firefox on Mac 10.6.
    Both and although I feel, I go to Safari.
    James

    It could be that one of your modules interfere. You can try to troubleshoot and to understand that we could be. Instructions for this are here - Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems

    Another approach would be to reset Firefox. Instructions for this are here - Refresh Firefox – reset the parameters and modules

  • Is it possible to create interactive drop-down lists that reference the tables on pages separate from the PDF?

    I'm looking to create a user to input PDF in the drop-down lists are used to search for tables, however, I'm not very familiar with the options that are available or if this is even possible?  Also, is it possible to write a substantive code that could read the text of the user entered to perform a search or even solve an equation? Can someone let me know if these elements are possible and/or let me know what adobe program may be required to accomplish these tasks? Thank you!

    PDF documents have no concept of "tables" as MS Word or MS Excel has. There is content that looks like a table.

    Acrobat JavaScript knows tables and form fields. So we could have a table in JavaScript and complete a series of fields that looks like a table. You can use JavaScript to find the table.

    JavaScript in Acrobat can accept user entries in the fields and pop-up windows.

    It is possible to solve theoretical equations the user if the good rating or coding is used.

    D.P. Story is an evangelist generated LaTex PDF to create PDFS with mathematical symbols, and he also created the AcroTex product that allows to create educational tools that includes mathematics calculation self placement tests.

  • Is this possible? Subforms appeal based on the drop-down list associated with the database

    I'm hoping to make a dynamic shape and I wonder if it's possible.

    I have a database with about 300 entries - pieces of agricultural goods and a few little bits of info on each of these properties. I want to create a form where users can choose the piece there rather than the property in a drop-down list. Based on the property they select, another menu drop down to fill with the cultures associated with this property. Then based on the selection made in this drop-down list, a specific form will be brought upward.

    For example, a person selects property #102 in the drop-down list. In the database, property #102 is associated with wheat, barley and corn, so the next drop would be complete with these three cultures. The user selects the wheat in the drop-down list and the form of wheat would be called. 

    I hope I explained that well enough.

    Is this possible? And if it's possible, how complicated to do? Assuming that I already have the database and subforms, it would be a long process from weeks to the script, or it would be simple enough?

    Yes, this could be done, here is an example that should help: Drop dependent dropdown (specimen attached)

    On the basis of selection (change event of the second menu drop-down), you can show or hide a subform.

    -Wasil

  • Drop-down list always displays the first value? How can I empty place

    I have several drop down from the fields list. An example would be the city. It allows a user to select a city. I want the form to be completely empty to start. Currently, when the form is initially pulled up, it shows the first value in the list. All my drop-down list fields exhibit the same behavior. Is it possible to be just empty instead?

    You can send the form to [email protected] and I'll take a look to see what is happening?

    Thank you

    Paul

  • How to fill a textfield based on a drop-down list and a checkbox control

    Hi guys,.

    I need help.
    first step: I have a drop down list, if I click in the dropdownlist control 'a' and place it in the digital field a number greater than 99, checkbox must be marked and second step: a textfield1 must be visible.

    the first stage works perfectly, but the second does not.
    This is my code for the second stage of the event: java script of change of

    If ((DropDownList1.rawValue == "a") & & (this.rawValue == 1))
    {
    TextField1.presence = "visible";
    }
    on the other
    TextField1.presence = 'hidden ';


    everyone has no idea why?

    Thank you!!

    Diana

    Hi Diana,

    You are on the right track. deleteItem is zero base; so if you want to remove the second point, it would be deleteItem (1).

    I would recommend a script similar to the output from the drop-down list, so that if the user goes back and changes the value, the same logic would apply. Also when you remove items from a drop-down list by using script, it is useful to addItem() again in the other part of the if statement. In this way, you can restore the list because the shape is changed.

    Also I would wrap the script in the numberField in another State to check for null first.

    Attached example.

    Good luck

    Niall

Maybe you are looking for

  • 18 Firefox crashes when you press browse to upload a file?

    FF18 is installed, it crashes when you press the Browse button to transfer a file.

  • Under W7 network printer cannot be found

    I have a Toshiba laptop Satellite 500 and I can not install my printer (Canon ip5200). It works with Windows 7. With another laptop, running with Windows XP, it works fine. W7 cannot find a driver on the network Can someone help me? Robert

  • Could do the [R] Sandisk Clip + supports Chinse characters please?

    I read an old message that indicated that Clip + can not display Chinese characters. Are there solutions to solve this problem? SanDisk was able to deliver a new firmware to add support for Chinese character? I'm from the Mainland of China, and I bou

  • BlackBerry software get installed and opens but not office?

    Carefully followed the instructions and the latest get is on my passport and my win7 desktop. Dblclicking on the implementation of office get he gets up, running and then he finds the passport and labels it correctly... But he does "then logs? When I

  • Windows 8 slows internet?

    I got my new laptop with windows 8 and when I connect to the internet the maximum number is 3 bars, my laptop is 3 meters where I get my internet. My brother has a laptop that is 2 years older than me with windows 7 and it gets full and internet bars