javascript - How modify selectedIndex -


I have two dimensional array, , "Pacific / Wallis, WFT-12")

First value to & lt; Id = "stojon"> gt; & Lt; Options & gt; & Lt; / Option & gt; & Lt; & lt; Input type = "text" id = "timezone" & gt;

contains the old code, which is / code> , second value (after semicolon) is correct:

  function SelChng ( ) {Sel = document.getElementById ("stzone"); Inpt = document.getElementById ("timezone"); Inpt.disabled =! (Sel.value == "Extended"); Inpt.value = TZa [Sel.selectedIndex]; }  

The new code is given below:

  $ (document) .ready (function () {var input = $ ("# timezone") $ ("Disabled", true); $ ("change", function () {if ($ (this) .val () == "extended") {input.attr ("disabled", false);} and {Input.attr ("disabled", true);} input.val () = TGA [(this.) Selected index];});});  

and do not change the value according to the array according to the input type = "text" .

Please take some ideas to repair my code?

To make the first part of the code the first part of the code, I think your issue is JQuery With:

  input.val () = TGAA [(this). Selected index];  

It looks like this should be:

  Input.val (Tizza [this.Schedited Index]); See how to set a value with   

val () .


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -