Can I highlight am Input text from clickng Radio Button?
Posted: Mon Sep 12, 2016 8:35 am
I am giving the admin people a choice of using two options, via two radio buttons.
Below the radio buttons are two input fields. One for a Code, one for a URL.
They both use the SAME database field. On the consumer site, it will query if there is a / in the field and if there is, it will provide a URL link.
If there is no / in the field, it will create the URL based on the code.
But in Admin, I want the said field that is selected via the radio buttons, to be "lit", so they now which one they have chosen, will be used. I can do that on page loading, but how do I alter it if they alter the radio buttons. I Assume via some javascript, but not sure how to do it.
It's just a means of making sure when they click it, they know full well which one will be used.
It can be lit, or a border added. Not bothered.
Below the radio buttons are two input fields. One for a Code, one for a URL.
They both use the SAME database field. On the consumer site, it will query if there is a / in the field and if there is, it will provide a URL link.
If there is no / in the field, it will create the URL based on the code.
But in Admin, I want the said field that is selected via the radio buttons, to be "lit", so they now which one they have chosen, will be used. I can do that on page loading, but how do I alter it if they alter the radio buttons. I Assume via some javascript, but not sure how to do it.
Code: Select all
Which link to use: <input type='radio' name='freetext' value='stockcode' checked>stockcode
<input type='radio' name='freetext' value='url'>URL <br/>
Stock Code: <input type='text' name='stockcode' style='width: 160px' value='JHG876'><br/>
Or enter URL: https://www.site.co.uk<input type='text' name='url' style='width: 160px' value='JHG876'>It can be lit, or a border added. Not bothered.