Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select id="domain" name="domain_name" class="form-group form-control">
- <option id="first_domain" value="" selected disabled>Alan Adı</option>
- <option>Deneme Değeri</option>
- <option>Sample Value</option>
- <option>Third Sample Value</option>
- </select>
- <script>
- $('#domain').change(function () {
- $.post("www.SITEADRESS.com/post.php", {
- authenticity_token: "<%= form_authenticity_token.to_s %>"
- })
- .done(function (response) {
- $('#departments').find('option').not(':first').remove();
- response.data.data.forEach(function (element) {
- $('#first_department').after("<option value='" + element.id + "'>" + element.name + "</option>");
- });
- })
- .fail(function (xhr, status, error) {
- alert("Gönderme İşleminde sorun oluştu, lütfen sistem yöneticiniz ile görüşünüz. Hata Bilgisi: " + error);
- });
- });
- </script>
Add Comment
Please, Sign In to add comment