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

Question

Question

.Val() always returns 0 in Forms10

asked on March 8, 2016

Hello. I am trying to get the value from another input box once the lookup has completed. In my example, #q4 is the lookup field and my lookup fills the other input boxes works correctly. The alert box will always display 0 instead of the value of input box. I have even tried to refer to same #q4 input box and still getting 0.  I am only using the alert function for testing purposes. I am testing this in preview mode. Is this a limitation in preview mode? If not, I am sure it is something simple I am missing. Thanks for your time.

$(document).ready(function () {
  $("#q4").on('change lookup', ShowValue);
  function ShowValue() {
	var q5value = $("#q5").val();
    alert(q5value);
  } 
});

 

0 0

Answer

SELECTED ANSWER
replied on March 8, 2016

Try "#q5 input" instead of just "#q5"

1 0

Replies

replied on March 8, 2016

Scott. Thanks! I figured it was something simple.

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

Sign in to reply to this post.