Jump to content

help changin a value


brown2005

Recommended Posts

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,,
Link to comment
https://forums.phpfreaks.com/topic/9116-help-changin-a-value/#findComment-33523
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.