sholladay Posted October 7, 2015 Share Posted October 7, 2015 This does nothing. I want it to duplicate the data from one field and show it in another. <script> jQuery("#RESULT_TextField-3").change(function(){ jQuery("#RESULT_TextField-13").val(jQuery("#RESULT_TextField-3").text());});</script> Link to comment Share on other sites More sharing options...
justsomeguy Posted October 7, 2015 Share Posted October 7, 2015 Put an alert or something in there to make sure that function runs when the value changes. Also, make sure you're checking your browser's developer console for error messages. Link to comment Share on other sites More sharing options...
dsonesuk Posted October 8, 2015 Share Posted October 8, 2015 You can't use text() for form elements, always use val(). 1 Link to comment Share on other sites More sharing options...
sholladay Posted October 8, 2015 Author Share Posted October 8, 2015 You can't use text() for form elements, always use val(). I changed it. Still nothing. Now it is the following, and still blank when I view it. <script> jQuery("#RESULT_TextField-4").change(function(){ jQuery("#RESULT_TextField-14").val(jQuery("#RESULT_TextField-4").val());});</script> Link to comment Share on other sites More sharing options...
dsonesuk Posted October 8, 2015 Share Posted October 8, 2015 (edited) Depends where you have placed this code?Have you links to jquery library files?Do you have jQuery.noConflict() to tell jquery to use 'jQuery' instead of '$'?Are these element created dynamically using jquery/javascript?All of these need to be correct for jquery to run, since we have only a snippet of code to work with we are relying on you to have correctly set these properly. Edited October 8, 2015 by dsonesuk Link to comment Share on other sites More sharing options...
sholladay Posted October 8, 2015 Author Share Posted October 8, 2015 Depends where you have placed this code?Have you links to jquery library files?Do you have jQuery.noConflict() to tell jquery to use 'jQuery' instead of '$'?Are these element created dynamically using jquery/javascript?All of these need to be correct for jquery to run, since we have only a snippet of code to work with we are relying on you to have correctly set these properly. Oh my, yes, I can see how you would need to know more information. But your questions are a bit over my head. I will try to answer.I placed the code in the 'custom code' section of Formsite.com (it allows me to make personalized forms). I don't have any idea what your second question means. I do not have the noconflict set up, I can set that up in the code I have above, can you give me an example? I have other coding set up without using that. Some are working, just not this one.Does this help at all? Link to comment Share on other sites More sharing options...
dsonesuk Posted October 8, 2015 Share Posted October 8, 2015 Usually you would see undefined $ or jQuery if jquery lib files where not linked to and jQuery.noConflict() set up correctly and jquefy not work at all. $(function(){alert("yea i'm working, but i should always work");});//jQuery.noConflict(); try commented out and uncommentedjQuery(function(){alert("jQuery prefix present and correct and ready for action sir!");}); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now