So far so good...drop down and text field work. Now the difficult part (for me at least). If I was to select something from the drop down list (ie. "Option 1") and I wanted the text box to populate with something like "You've selected Option 1" and not the exact text from the drop down field, can this be done?
Hi Glenn,
1. Add a dropdown with the name select1.
2. Add an input with the name text1.
3. Paste this script in a html element.
1. Add a dropdown with the name select1.
2. Add an input with the name text1.
3. Paste this script in a html element.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script>var jQ = $.noConflict(true);
jQ(function() {
jQ("input[name='text1']").prop("readonly", true);
jQ("select[name='select1']").change(function() {
var myDrpdn = "You selected " + jQ(this).val();
jQ("input[name='text1']").val(myDrpdn);
});
});</script>
jQ(function() {
jQ("input[name='text1']").prop("readonly", true);
jQ("select[name='select1']").change(function() {
var myDrpdn = "You selected " + jQ(this).val();
jQ("input[name='text1']").val(myDrpdn);
});
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.