You are viewing limited content. For full access, please sign in.

Question

Question

Did Javascript implementation change in Forms between 9.0 and 9.1?

asked on January 24, 2014

I was working on a new form with 9.1 on a test environment and I want to get the current value of a field that was changed when it started the javascript function. 

 

In 9.0 I was able to use $(this).val(); to get a value of the current field, but in 9.1 it does not work. What changed? Is there a resource that will enlighten me as to the changes I should be aware of between the two versions? 

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on January 24, 2014 Show version history

The version of jQuery included with Forms 9.0 was 1.7.2. Forms 9.1 includes jQuery version 1.10.0.  $(this).val(); should still work; something else in your code might be the culprit.

 

Here's an example: It takes the value of a drop-down field and puts it in a single line field when you select an option in the drop-down.

 

$(document).ready(function () {
  
  $('#q1 select').change(function () {
    
    $('#q2 input').val($(this).val());
  });
});

It's important to point out that, in this example, this refers to #q1 select.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.