I have a variable that is set on another page, and then is brought through ajax into another page. On that page, I would like to copy that variable into an input field. I thought I had the code correct, but for some reason, it is not working.
<script type="text/javascript"> function setImageLocation() { var imageLocation = 1234; $("#create_image_location").val() = imageLocation; } </script> Also, is there a way to copy the the value to the input field, right when it is brought in through ajax? Or do I HAVE to copy it with an event?