Jump to content

Can someone tell my why this script does nothing?


sholladay
 Share

Recommended Posts

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

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 by dsonesuk
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...