Dear all,


i have checkbox
ex:

<?PHP
$price_1 = $100
$price_2 = $10

?>


<input type=checkbox name=products[] value=id_1> buy host
<input type=checkbox name=products[] value=id_2> buy domain
blah blah....

now i want added the javascript when check box someone
show the price in text input

ex:

<input type=checkbox name=products[] value=id_1 onclick="showprice($price_1)"> buy host
<input type=checkbox name=products[] value=id_2 onclick="showprice($price_2)">  buy domain

and then + all price's if check multi products and when you uncheck - the price from total

then show price in

<input type=text name=total value="Javascript(showallprice)">

like this idea what the code javascript need for that please help me

i have get help thanks

cancel this thread

i dont think it can be cancelled, just mark it as solved.

Member Avatar for rajarajan2017

Please mark the thread as solved where you got the result. And leave as it is this thread or mark it as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.