Click here to Skip to main content
16,012,168 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i want to do addmore operation in my application i dont know how explain my problem

if yu dont mind i want to same operation like in this website

www.freecharge.in


i this i am typing my number and amount as 100 or 200 after pressing proceed button, at the buttom u can select coupons.

please look in to the website which i have mentioned above.i need the same operation(add more operation) in my application.please help me
Posted

1 solution

Hi,

I make some code for your requirement.

check this once

place this code whereever you want like in datacontrol or in another control
HTML
<div id="addmoreid">
  <input type ="checkbox" onclick="f1()" />
 </div>
  <div id="addmorenum"></div>


And javascript contains following code

JavaScript
function f1() {
         document.getElementById("addmorenum").innerHTML = "you selected count is <div id="\"cnt\"">1</div>";
         document.getElementById("addmoreid").innerHTML = "<a href="\"#\"" onclick="\"f2()\"">+</a>";
     }
     function f2() {
         document.getElementById("cnt").innerText = parseInt(document.getElementById("cnt").innerText) + 1;
     }


Here you can use Jquery to post data to server when user clicks on + button

first check this functionality then you can implement this to achieve your requirement.

All the Best
 
Share this answer
 
Comments
yerrojumeher 12-Oct-11 5:14am    
thanks murali
Muralikrishna8811 12-Oct-11 5:16am    
you are welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900