How can i link two drop down buttons added dynamically

guys got a wired problem but plz help.
i m using jbuilder to create m y website.
in this i got 2 drop down buttons.
when the 1st(p1) 1 is clicked then second 1(a1) shows value respective of the value clicked in 1st 1.
i dynamically add similar drop dowm on click of a button.
but when value in the new drop down is selected (p2) it shows changes in 1st drop down (a1) not in newly created drop down(a2)
could u guys plz help me out.
its really urgent

this is the code i m using to create the drop down
->
var i=0;
var option=new Array();
function insRow(){
var d=document.getElementById("div");
d.innerHTML+="<select id='D"+i+"' class='input' onChange='getSh(this.selectedIndex)'><option>Select Here</option>"+
<%
rs=st.executeQuery("select * from productTab");
while(rs.next())
%>
"<option><%=rs.getString("productName")%></option>"+
<%}%>
"</select>"
d.innerHTML+="<select name='DD"+i+"' id='DD"+i+"' class='input'><option>Select Here</option></select>"
d.innerHTML+="<select name='DDD+i' id='DDD+i' class='input'><option>Select Here</option></select>"
d.innerHTML+="<input type=text name='T+i' id='T+i' class='input-time'><br>"
option +=["DD"+i];
option +=["D"+i];
i++;
function getSh(selectedcitygroup)
document.getElementById("DD+i").options.length=1
if(selectedcitygroup>0){
for(i=0;i<cities[selectedcitygroup].length; i++)
document.getElementById("DD+i").options[document.getElementById("DD+i").options.length]=new Option(cities[selectedcitygroup].split("|")[0], cities[selectedcitygroup][i].split("|")[1])

Similar Messages

  • How can I use two drop down lists for one time value?

    I want to enter the length of time that someone does an activity in hours and minutes using two drop down lists, then enter them as a single time value (H:i:s) in Mysql.
    I've used the basic drop down lists, and a few different variations of the following with no success (seconds is a hidden field with a value of "00"):
                           GetSQLValueString(strftime('%H:%i:%s', strtotime($_POST["sleeptimemin"]." ".$_POST["sleeptimehr"]." ".$_POST["seconds"])), "date"),
    This returns 00:00:16, no matter what is selected on the drop down list.
    Any help would be appreciated.

    MySQL stores times in human-understandable format, using the 24-hour clock.
    GetSQLValueString($_POST['sleeptimehr'] . ':' . $_POST['sleeptimemin'] . ':00', "date"),

  • How can I link two accounts on Behance: Adobe ID and earlier?

    I have some troubles with my old behance account created before Adobe ID subscription -- can't sign up. How can I link two accounts?

    You should probably ask in Behance
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • How can I get the drop down menu on the internet to work, which shows most visited websites? It was working on Firefox, and now doesn't.

    On the internet when using Firefox, the drop down menu on recently visited sites (where you type in web addresses), does not work. How can I get it drop down and show websites that I recently visited, so I can click on them there instead of retyping them every time?

    Make sure that the Location Bar is not set to "Nothing":
    * Firefox (Tools) > Options > Privacy > Location Bar: When using the location bar, suggest: History, Bookmarks, History and Bookmarks
    Another possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • In ER DIagram using toad( how can i link two tables)

    Hi,
    Any Toad expert can guide me that how can i link two tables in Toad in ER Diagram to show the relationship between two tables.
    Thanks

    Hi,
    I hope there is foreign key relationship in tables, if so then you can click on "Find table dependencies" icon which will draw lines between them.
    ~Vinod

  • How can I print a drop down list of favorites I have on the favorites bar?

    How can I print a drop down list of favorites i have on the favorites bar?

    Make a screen shot and print that.

  • Linking two drop down list together

    I have two drop downs list and I need to link them together for the user to only answer one of them and it won't allow an answer in the other or vice versa. How can I set that up?
    If answer drop down list A then can't answer drop down list B
    else
    if drop down list B is answered then drop down list A can't be answered.

    The attached contains two drop-down lists - apples and oranges. Each drop-down list has a default list item value of " ", thus the default index is 0 (zero). If you select a value other than default, the other drop-down list has it's access protected and the list item reset to 0 (zero). Conversely, if you select the default value, the other drop-down list becomes open or accessible.
    // form1.page1.apples::exit - (JavaScript, client)
    if (form1.page1.apples.selectedIndex != 0) {
      form1.page1.oranges.access = "protected";
      form1.page1.oranges.selectedIndex = 0;
    else {
      form1.page1.oranges.access = "open";
    // form1.page1.oranges::exit - (JavaScript, client)
    if (form1.page1.oranges.selectedIndex != 0) {
      form1.page1.apples.access = "protected";
      form1.page1.apples.selectedIndex = 0;
    else {
      form1.page1.apples.access = "open";
    Steve

  • How can I link two charts on different pages in one document?

    I have a chart on the first page How cn aI link two charts on differnetof my document. The last line is a intermediate total (formula). How can I link the chart on the next page to this total, so I can go on with the calculation without having to copy and paste the result of the first chart?

    Timan,
    I'm sure that you could figure out how to get along with Pages, or Numbers. Each has it's own advantages and disadvantages.
    If you put all your text that doesn't need to be in the table into text boxes, you can place the text boxes over the table in any arrangement you like. Be sure to turn off Object Causes Wrap in the Wrap Inspector.
    Here is an example of a single table across two pages with other text on the page:
    The formula in the cell displaying 500 is =B1 * 100
    On the other hand, I agree that the feature of linking to sister tables would be a nice enhancement and I encourage you to submit the idea vie Pages > Feedback > Enhancement Request.
    Regards,
    Jerry

  • How can I locate the drop down menu to select thumbnails for viewing my photos?

    I am using Microsoft Windows Vista. I select Files> Get photos and Videos> From Files and Folders.  I select my photos and In my views I have a choice of different size icons, list, details and tiles.  The icons are a flower image. When I select an image to view it only appears as an extra large icon on the middle right side of the moniter.  I would like to view the thumbnail of the photo bfore I bring to my organizer.  The drop down menu doesn't have a choice for thumbnail.  

    Perhaps I need to supply more details.  I am using PSE9.  I haven't any problem importing the images into the Organizer as I just select the Icons and select "Get Media" or "Open" and they transfer over to the Organizer.  I would like to see the image as a thumbnail not an icon when when making the selection.  If I right click them, the Icon, and select open they will open in "Windows Live Photo Gallery".
    The icons are now listed on the left  side of the monitor about the right middle it states "Select A File To Preview".  When I select a file (icon) a large file (icon) appears in that area and it should be a thumbnail of the image. Somehow I can't locate the drop down menu taht permits me to make that selection.  I think it has something to do with my files being able to open in Windows Live Photo Gallery when right clicking and select Open.  Is the drop down menu only available in Windows 7?

  • How can I link two frames via a button on one of the frame?help Plz

    Ok,here is the problem. I got two fully working java frames,each has different funcion. On one of the frames(my home Frame" Frame 1" ) i got a button called "Add User", when i press it i should then get my other frame(Frame2) to popup/run. in Frame1 i got this code as action for the add user button.Note: each Frame have thier own Main class.
    public void actionPerformed (ActionEvent e)
    if (e.getSource()==jbtnAddUser)
    // new Frame2(this,"hshsh",jb);
    ////////////// The commented line is where i am not sure what to put in there, Frame1 is the name of my Frame 2 class......
    Please could anyone tell me how do i link Frame 2 to Frame 1....i appreciate it....Max

    You can create both together on pgm startup (instaniation of the class).
    Next for frame1 - I'll call it - you can setBounds(int, int, int, int) and setVisible(true); When you press the button on frame1 to get frame2, you can then do frame1.hide(), followed by frame2 setBounds and setVisible. Finally, when you are done with frame2 you can do frame2.dispose() and frame1.show(). try that.

  • How can I get bookmark drop down to extend folder list to the left instead of the right?

    Recently cleaned up my bookmarks. Previously when I clicked on the bookmark file bar icon (between history and tools buttons at the top of the screen) the bookmark drop down would appear with my folders and links (as expected) and when I moused over a folder it would open a drop down list on the left of the main bookmark drop down but now it is opening on the right. How can I get it back to opening on the right?
    This is not about having a bookmark pane always open on the left side of the window. Rather it is about how to control how the drop down menus act. (OSX 10.9.3 and Firefox 30.0)
    Thanks!

    So I think I understand what your suggesting but I have a folder inside a folder that has long names and it opens back to the left (after the initially opening to the right) and appears to overlay the screen space needed to display the titles.
    If your right (no pun intended) then the programming that supports the drop down menu display would need to scan through all the enclosed folders looking for the potentially longest title to determine which way to open the list?
    I know that this is a minor issue but it does seem that something may have changed here. It would be nice if there was away to control this part of the drop down operation. Thanks!

  • How can i create a drop down menu for set qty in my store?

    I'm wondering how i can create a drop down menu for the qty module that sits on the individual product page. My client sells in quantities of 6 packs. I currently have the minimum order at 6 but i would like to give consumers the option for 6,12,18...and so forth. I was told that it could be accomplished? Hopefully someone can help me.

    Hi Chris -
    Thank you for your reply! I had seen your article before, and just now again attempted to follow it, but I get stuck. There are two things that I'm confused by.
    First off, toward the top, referring to the initial button, you say to add this interaction:
    ON CLICK; Play Transition to comboBox: selected
    ON ROLL OUT; Play Transition to comboBox normal if comboBox is in over state
    ON ROLL OVER; Play Transition to comboBox over if comboBox is in normal
    However, I do not see these transition options. When I select the button, the only interactions I have are to Play transistion to state, Play action sequence, Go to URL, and two for videos. So that's the first roadblock for me.
    But, trying to get passed that, I went down to the portion of the article that refers to adding interaction to the dataset items. Again, I don't get it, as I see no way to add interaction to a dataset item. When I open my design-time data menu, I do see the items, and am able to rename each item, add additional rows, and change the shape of the datalist layout. However, I see no way to add an interaction to a dataset item. I must be missing a step ... Can you help with this?
    Again, thank you!
    Amy

  • How can I create a drop down menu from an array

    Hello all,
    I am attempting to create a subvi that allows the end user to add a part number to an .txt file, and assigns that part number a value than can be used to select one of two modes of communication to be used to write to a EEPROM.   I am using the "write key.vi" and the "read key.vi" to create and read the .txt file.  What I would like to do is is use "get section names.vi" to read all of the part numbers and dump them into a drop down menu after the end user generates the file using the subvi.
    I guess my question is how do I dump a 1D string array into a drop down menu.
    I have attached some semi-functional .vi's to give an idea of what i am attempting to do.
    Erik
    Attachments:
    FirsttryPN.vi ‏15 KB
    PNwrite.vi ‏16 KB

    Place a Ring control on your front panel, then create a property node on the block digram. You can wire the output array of "Get Section Names" to populate the Strings[ ] property of the Ring.
    Retrieve the specific string selected by the operator by wiring the Ring control to the Index Array function.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How can you change a drop down menu's selection in a case statement?

    Hi,
    I am trying to an array finding vi. This VI will take an existing xml file and after the user has selected his/her equipment, input, output, and frequency it will put all of those options into a string and search the xml file for that exact array name and display it on an output screen. The problem I am having is that my input and outputs selection needs to be a little different depending upon the equipment selected. I thought that I could use a case statement to change the input and output selectable options, but I have run into many snags with it. For one everytime I place a new Input and Output drop down menu in the case statement it wants to place a new one in the front panel (I only want one input and output not three I have two inputs and outputs hidden right now). I believe I am using the case statement wrong... Can anyone help change my input and output selectable options depending upon the equipment selected. Attached is my xml file, Array Find.vi (the original one), and Array Find_Test.vi (this is the one I am trying to modify).
    Thanks,
    dlovell
    Solved!
    Go to Solution.
    Attachments:
    Find Array.zip ‏126 KB

    Hi dlovell,
    There are 2 key things I'd recommend for the code - using property nodes to edit the strings in the combo boxes.  Something like the following snippet:
    Also, check your CPU in task manager when running the code.  It will eat a whole core of your machine (25% quad core, 50% dual, 100% single) - that is because you are running the while loop and polling the control as fast as Windows will allow you to.  Using Event Structures is a much more efficient way of working in this example.
    Check out the MOD attached 
    Regards,
    Peter D
    Attachments:
    MOD_Find Array.vi ‏28 KB

Maybe you are looking for

  • Issue with Write Back

    Hi All, I have a requirement where the user can writeback to a field. The table has two columns COMBI and SERVICE_REV. COMBI is the key cloumn . Below is the code in the writeback template. <?xml version="1.0" encoding="utf-8"?> <WebMessageTables xml

  • Can no longer connect to home Wi Fi

    My wife and I both have i phones. There was a time when we frist got our phones we could connect automatically to our Netgear router. Enjoyed face time etc. Recently we discovered that our phones see the Wi Fi but wont connect. Our home laptops have

  • Variable Bind Data in Oracle 9i

    Hi everyone, I am trying to write a query in Oracle 9i which can resolve bound data names and values, but can't seem to find a way to do so. I have a 10g query which works great, but uses v$sql_bind_capture to find the variable names. 10g query: SELE

  • Calling SQL*Loader from OCCI

    Hi All, I need to access SQL*Loader from C++. I know there is an interface for OCI to access SQL*Loader. I also know there is a gnu project of a c++ wrapper to the OCI-SQL*Loader interface (odpd). According to the OCCI documentation it is just a C++

  • Can't replace deleted firmwa

    I recently purchased a 20gb Zen Sleek Photo unit. I attempted to update the firmware using the exe file from the support section of the Creative website (ZenSleekP4S_PCFW_LB_2_0_03.exe). I started my player in Recovery mode and selected Replace Firmw