brown2005 Posted May 5, 2006 Share Posted May 5, 2006 Hi,I have a form,where i have a fieldFeatured and they can select yes or No.If they select no i want a price field that says £5.00 and if they select yes i want a price field that says £10.00.any help please? Quote Link to comment Share on other sites More sharing options...
GBS Posted May 5, 2006 Share Posted May 5, 2006 Hi,,Try maybe something like that,[code]<html><head><title>testing,,</title><style></style></head><body><script>function ShowPrices(node){var prices=node.value;document.getElementById('price').innerHTML=prices;document.getElementById('price').style.visibility="visible";}function Hideprice(){document.getElementById('price').style.visibility="hidden";}</script><form name="test">Please, select an option:<input type="radio" name="pricing" value="£5.00" onclick="ShowPrices(this);">price A<input type="radio" name="pricing" value="£10.00" onclick="ShowPrices(this);">price B<div id="price" style="visibility:hidden;border-color:blue;border-width: 1px;border-style: solid;width:50px;" ></div><br><input type="submit" name="Request" value="Submit"><br><br><input type="reset" name="Clear" value="Clear form" onclick="Hideprice()"></form></body></html>[/code]example done with radio buttons, but you can transpose it using checkboxes, selectbox,...Hoping it helps,,l8tr,, Quote Link to comment Share on other sites More sharing options...
brown2005 Posted May 5, 2006 Author Share Posted May 5, 2006 spot on....thats exactly what i want...cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.