Displaying an item depending on the users' selection
Hullo,
I am working on sam php code that captures users' details, depending on their choice. If the user selects "No", then the products will not be delivered to him, and so; the form collecting details will not be displayed. However, if he selects "Yes" option, then the form to collect his details will be displayed, and he enters his details. Now, I have been able to do it using a radiobutton, but I want to do it using a select drop down menu, to save me sam space. Here is the code I have been working with;
First, the javascript;
<script type = "text/javascript" language = "Javascript">
function Proof(obj) {
if (document.getElementById('delivery').checked) {
displayValue = "block";
} else {
displayValue = "none";
}
document.getElementById('make_delivery').style.display = displayValue;
}
</script>
Related Article:getting selected div elements using curl
is a PHP discussion thread by amzu that has 1 reply, was last updated 7 months ago and has been tagged with the keywords: curl.
@jstfsklh211, with that code, I am not having any problems. However what I want to do is to change the radiobutton to a drop down menu, because; the radiobutton is taking up too much space. I want it to be such that when a user select YES, a form is displayed for them to fill, and if they select NO, then the form stays hidden.